Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewServiceError ¶
func NewServiceErrorf ¶
Types ¶
type ServiceError ¶
type ServiceError struct {
// contains filtered or unexported fields
}
func (ServiceError) Code ¶
func (e ServiceError) Code() ErrorCode
func (ServiceError) Error ¶
func (e ServiceError) Error() string
func (ServiceError) GRPCStatus ¶
func (e ServiceError) GRPCStatus() *status.Status
Set the gRPC status to only expose the top error message.
This is to prevent any full error contexts (from wrapped errors) being exposed to users by the gateway. e.g. "{"code":2,"message":"something went wrong scanning order: failed to connect to `host=postgres user=postgres database=postgres`: hostname resolving error (lookup postgres on 127.0.0.11:53: server misbehaving)","details":[]}"
func (ServiceError) Unwrap ¶
func (e ServiceError) Unwrap() error
Click to show internal directories.
Click to hide internal directories.