grpcErrors

package
v0.0.0-...-f5cdc36 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 14, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrNotFound         = Error("not found")
	ErrNoCtxMetaData    = Error("no ctx metadata")
	ErrInvalidSessionId = Error("invalid session id")
	ErrEmailExists      = Error("email already exists")
)

Variables

This section is empty.

Functions

func ErrorResponse

func ErrorResponse(err error, msg string) error

GRPC Error response

func MapGRPCErrCodeToHttpStatus

func MapGRPCErrCodeToHttpStatus(code codes.Code) int

Map GRPC errors codes to http status

func ParseGRPCErrStatusCode

func ParseGRPCErrStatusCode(err error) codes.Code

Parse error and get code

Types

type Error

type Error string

func (Error) Error

func (e Error) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL