Documentation ¶
Overview ¶
Package errors represents base tron error struct and parsing method.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Details ¶ added in v0.9.0
type Details struct { Code string `json:"code,omitempty"` Field string `json:"field,omitempty"` Description string `json:"description,omitempty"` }
Details represents error details.
type Error ¶
type Error struct { Message string `json:"message,omitempty"` Details []*Details `json:"details,omitempty"` TraceID string `json:"trace_id"` // contains filtered or unexported fields }
Error represents base http error struct.
func ParseError ¶
ParseError parse error to Error struct. Support lissteron/simplerr and ozzo-validation packages.
func (*Error) GRPCStatus ¶ added in v0.8.0
GRPCStatus build status.Status from current error.
func (*Error) HTTPStatus ¶ added in v0.8.0
HTTPStatus return http status for error.
Click to show internal directories.
Click to hide internal directories.