Documentation ¶
Overview ¶
Package errors package
Index ¶
Constants ¶
View Source
const ( EInternal = "internal error" ENotImplemented = "not implemented" ENotFound = "not found" EConflict = "conflict" EOptimisticLock = "optimistic lock" EInvalid = "invalid" EForbidden = "forbidden" ETooManyRequests = "too many requests" ETooLarge = "request too large" )
Error code constants
Variables ¶
This section is empty.
Functions ¶
func ErrorCode ¶
ErrorCode returns the code of the root error, if available; otherwise returns EINTERNAL.
func ErrorMessage ¶
ErrorMessage returns the messages associated with the error
func WithErrorErr ¶
func WithErrorErr(err error) func(*TharsisError)
WithErrorErr sets the err on the error.
Types ¶
type TharsisError ¶
TharsisError is the internal error implementation for the Tharsis API
func NewError ¶
func NewError(code string, msg string, options ...func(*TharsisError)) *TharsisError
NewError creates an instance of TharsisError
func (*TharsisError) Error ¶
func (e *TharsisError) Error() string
Error implements the error interface by writing out the recursive messages.
Click to show internal directories.
Click to hide internal directories.