Documentation ¶
Index ¶
- func AwsErrCode(err error) string
- func ConvertGrpcErrorInServerInterceptor(ctx context.Context, err error) error
- func GrpcErrCode(err error) grpc_codes.Code
- func GrpcError(c grpc_codes.Code, msg string) error
- func GrpcErrorf(c grpc_codes.Code, format string, a ...interface{}) error
- func IsDeadlineExceeded(err error) bool
- func IsTransientNetworkError(err error) bool
- func UserFacingInternalGrpcErrorf(eventID *sentry.EventID, format string, a ...interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AwsErrCode ¶
func ConvertGrpcErrorInServerInterceptor ¶
Takes an error and return back an appropriate error that should be passed to grpc server handler. The goal here is to only pass grpc status set by perrors.grpcError and not native grpc status package, to avoid accidentally a grpc error from a dependency to client.
func GrpcErrCode ¶
func GrpcErrCode(err error) grpc_codes.Code
similar to spanner.ErrCode but handles wrapped errors
func GrpcErrorf ¶
func GrpcErrorf(c grpc_codes.Code, format string, a ...interface{}) error
func IsDeadlineExceeded ¶
func IsTransientNetworkError ¶
detect transient errors, e.g. https://stackoverflow.com/questions/45793299/how-to-check-if-error-is-tls-handshake-timeout-in-go
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.