Documentation ¶
Index ¶
Constants ¶
View Source
const ( Other int = iota // Unclassified error. This value is not printed in the error message. InvalidOperation // Invalid operation for this type of item. InvalidArgument // Invalid argument MalformedRequest // Malformed request body (decode problem). IO // External I/O error such as network failure. Logic // Logical error. Exist // Item already exists. NotExist // Item does not exist. APIAuthorization // API authorization method related error. UserCredentials // Authentication error (incorrect password, token). NotPermitted // Has no permissions. Private // Information withheld. Internal // Internal error or inconsistency. BrokenLink // Link target does not exist. Database // Error from database. DatabaseConnection // Connection to database error. RemoteConnection // Connection to remote service error. Validation // Input validation error. Unanticipated // Unanticipated error. )
Variables ¶
View Source
var ( InvalidPassword = errors.New("invalid password") LogicalError = errors.New("logical error") )
View Source
var (
RecordNotFound = errors.New("record is not found")
)
Functions ¶
func HandleErrorDB ¶
Types ¶
type CustomErrorWrapper ¶
func (CustomErrorWrapper) Dig ¶
func (err CustomErrorWrapper) Dig() CustomErrorWrapper
func (CustomErrorWrapper) Error ¶
func (err CustomErrorWrapper) Error() string
func (CustomErrorWrapper) ErrorStack ¶
func (err CustomErrorWrapper) ErrorStack() (res string)
func (CustomErrorWrapper) Unwrap ¶
func (err CustomErrorWrapper) Unwrap() error
Click to show internal directories.
Click to hide internal directories.