package
Version:
v0.5.0
Opens a new window with list of versions in this module.
Published: Oct 1, 2023
License: MIT
Opens a new window with license information.
Imports: 16
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Err builds annotated error instance from any error value
Handling handles an error by setting a message and a response status code
HandlingGRPC handle an error by defining HTTP response body and code
Wrap wraps an error adding an information message
type Error struct {
Code int `json:"code"`
Message string `json:"message"`
Trace []string `json:"-"`
Err error `json:"-"`
StatusCode int `json:"-"`
}
Error defines the properties for a basic error response
New creates and returns new normalized `Error` instance.
NewError creates and returns new normalized `Error` instance.
NotFoundError creates and returns 404 `Error`.
Error makes it compatible with the `error` interface
IsHandled check if error has already been handled
Source Files
¶
Click to show internal directories.
Click to hide internal directories.