Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Unknown error type is used for all generic errors Unknown = ErrorType(iota) // BadInput is used when any function encounters bad/incomplete input BadInput // NotFound is used when a resource cannot be located NotFound )
Variables ¶
This section is empty.
Functions ¶
func GetGRPCErrorCode ¶
GetGRPCErrorCode maps the ErrorType to gRPC status codes and returns it
func GetHTTPErrorCode ¶
GetHTTPErrorCode maps the ErrorType to http status codes and returns it
Types ¶
type HTTPError ¶
HTTPError associates an error message with a HTTP status code.
func NewHTTPError ¶
NewHTTPError wraps generic Go error to a HTTPError type and returns it
Click to show internal directories.
Click to hide internal directories.