# Functions
BadRequest new BadRequest error that is mapped to a 400 response.
ClientClosed new ClientClosed error that is mapped to an HTTP 499 response.
Clone deep clone error to a new error.
Code returns the http code for an error.
Conflict new Conflict error that is mapped to a 409 response.
Errorf returns an error object for the code, message and error info.
Forbidden new Forbidden error that is mapped to a 403 response.
FromError try to convert an error to *Error.
GatewayTimeout new GatewayTimeout error that is mapped to an HTTP 504 response.
InternalServer new InternalServer error that is mapped to a 500 response.
IsBadRequest determines if err is an error which indicates a BadRequest error.
IsClientClosed determines if err is an error which indicates a IsClientClosed error.
IsConflict determines if err is an error which indicates a Conflict error.
IsForbidden determines if err is an error which indicates a Forbidden error.
IsGatewayTimeout determines if err is an error which indicates a GatewayTimeout error.
IsInternalServer determines if err is an error which indicates an Internal error.
IsNotFound determines if err is an error which indicates an NotFound error.
IsServiceUnavailable determines if err is an error which indicates an Unavailable error.
IsUnauthorized determines if err is an error which indicates an Unauthorized error.
New returns an error object for the code, message.
Newf New(code fmt.Sprintf(format, a...)).
NotFound new NotFound error that is mapped to a 404 response.
Reason returns the reason for a particular error.
ServiceUnavailable new ServiceUnavailable error that is mapped to an HTTP 503 response.
ToGRPCCode converts an HTTP error code into the corresponding gRPC response status.
ToHTTPCode converts a gRPC error code into the corresponding HTTP response status.
Unauthorized new Unauthorized error that is mapped to a 401 response.
# Constants
CodeClientClosed is non-standard http status code, which defined by nginx.
SupportPackageIsVersion1 this constant should not be referenced by any other code.
UnknownCode is unknown code for error info.
UnknownReason is unknown reason for error info.
# Variables
No description provided by the author
optional int32 code = 1109;.
optional int32 default_code = 1108;.
No description provided by the author
# Interfaces
No description provided by the author