package
Version:
v0.0.0-...-720b936
Opens a new window with list of versions in this module.
Published: Jul 19, 2024
License: Apache-2.0
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
IsError checks if an error of type Error exists.
NewError wraps a provided error with an HTTP status code. This
function should be used when handlers encounter expected errors.
type Error struct {
Err error
Status int
}
Error is used to pass an error during the request through the
application with web specific context.
GetError returns a copy of the Error pointer.
Error implements the error interface. It uses the default message of the
wrapped error. This is what will be shown in the services' logs.
type ErrorDocument struct {
Error string `json:"error"`
Fields map[string]string `json:"fields,omitempty"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.