Documentation ¶
Index ¶
- func Write(rw http.ResponseWriter, err perrors.Error, mimeType string, ...)
- type ApiError
- func (e *ApiError) AddContext(s ...string) perrors.Error
- func (e *ApiError) Code() string
- func (e *ApiError) Context() []string
- func (e *ApiError) Description() string
- func (e *ApiError) Error() string
- func (e *ApiError) HttpCode() uint32
- func (e *ApiError) MultiStack() *stack.Multi
- func (e *ApiError) Type() string
- type ErrorBody
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Write ¶
func Write(rw http.ResponseWriter, err perrors.Error, mimeType string, traceInfo *trace.APITraceInfo)
Write will write out a platform error in a standard way - appropriate for the specified mime type
Types ¶
type ApiError ¶
type ApiError struct { ErrorType string ErrorCode string ErrorDescription string ErrorContext []string ErrorHttpCode uint32 HttpHeaders map[string]string ErrorMultiStack *stack.Multi }
ApiError implements the platform Error interface, but provides more support for HTTP-specific stuff
func (*ApiError) Description ¶
func (*ApiError) MultiStack ¶
Click to show internal directories.
Click to hide internal directories.