Documentation
¶
Overview ¶
Package errors provides definitions for some common errors that may be encountered. These errors may be eventually mapped to HTTP error codes, when being returned as a response.
Index ¶
Constants ¶
View Source
const ( // Unknown error type is used for all generic errors Unknown = ErrorType(iota) // BadInput is used when any function encounters bad/incomplete input BadInput // NotFound is used when a resource cannot be located NotFound )
Variables ¶
This section is empty.
Functions ¶
func GetHTTPErrorCode ¶
GetHTTPErrorCode maps the ErrorType to http status codes and returns it
Types ¶
Click to show internal directories.
Click to hide internal directories.