Documentation ¶
Overview ¶
Package cerr represents the core layer errors. This package includes the Error struct which helps to wrap common errors with HTTPStatusCode, so the errors may be classified based on their types. It also includes MismatchingSemVerError which is useful in the migration use cases where specific format versions may be expected.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
Error represents an error, aka Err, and assigns a HTTPStatusCode http status code to that error based on its generic category.
func Authentication ¶
Authentication wraps the err error and marks it as an authentication issue, that is, the caller is not identified and/or authenticated properly.
func Authorization ¶
Authorization wraps the err error and marks it as an authorization issue, that is, the caller is authenticated but does not have enough permission to invoke that function.
func BadRequest ¶
BadRequest wraps the err error and marks it as a bad request, that is, the caller of the function which is returning this error is responsible for that error and may fix it by modifying the args of that function.
func Conflict ¶
Conflict wraps the err error and marks it as a conflict issue, that is, the requested operation may not be accomplished due to the current conflicting system state.
func NotFound ¶
NotFound wraps the err error and marks it as a not found issue, that is, the requested object does not exist.
type MismatchingSemVerError ¶ added in v1.2.0
MismatchingSemVerError indicates an error condition where a specific semantic version was expected, but another version was present. This type is defined as an array containing two semantic version elements. The first element is the expected version and the second element is the actual version.
func (*MismatchingSemVerError) Error ¶ added in v1.2.0
func (msve *MismatchingSemVerError) Error() string
Error returns a string representation of `msve` error instance. This method causes *MismatchingSemVerError to implement error interface.