Categorygithub.com/ditointernet/go-dito/lib/errors
modulepackage
1.0.1
Repository: https://github.com/ditointernet/go-dito.git
Documentation: pkg.go.dev

# Functions

Kind this method receives an error, then compares its interface type with the CustomError interface if the interfaces types matches, returns its Code.
Kind this method receives an error, then compares its interface type with the CustomError interface if the interfaces types matches, returns its kind.
New returns a new instance of CustomError with the given message.
NewMissingRequiredDependency creates a new error that indicates a missing required dependency.

# Constants

CodeUnknown is the default code returned when the application doesn't attach any code into the error.
KindConflict are errors caused by requests with data that conflicts with the current state of the system.
KindInternal are errors caused by some internal fail like failed IO calls or invalid memory states.
KindInvalidInput are errors caused by some invalid values on the input.
KindNotFound are errors caused by any required resources that not exists on the data repository.
KindUnauthentication are errors caused by an unauthenticated call.
KindUnauthorized are errors caused by an unauthorized call.
KindUnexpected is the default kind returned when the application doesn't attach any kind into the error.

# Structs

CustomError is a structure that encodes useful information about a given error.

# Type aliases

CodeType is a string that contains error's code description.
KindType is a string that contains error's kind description.