errors

package
v0.0.0-...-a407490 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2023 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUserNotFound          = NewAppError(1001, "%s not found")
	ErrFieldCannotBeNull     = NewAppError(1002, "%s cannot be null, empty or with an invalid value.")
	ErrInvalidUUID           = NewAppError(1003, "Invalid UUID")
	ErrMissingAuthToken      = NewAppError(1004, "Missing authentication token")
	ErrInvalidAuthHeader     = NewAppError(1005, "Invalid authorization header")
	ErrInvalidSigningMethod  = NewAppError(1006, "Invalid signing method")
	ErrInvalidCredentials    = NewAppError(1007, "Invalid credentials")
	ErrUserNotRegistered     = NewAppError(1008, "User not registered")
	ErrInvalidTokenSignature = NewAppError(1009, "Invalid token signature")
	ErrInvalidBodyRequest    = NewAppError(1010, "Invalid body request")
	ErrUserAlreadyExists     = NewAppError(1011, "User already exists")
	ErrInvalidCPF            = NewAppError(1012, "Invalid CPF")
	ErrInternalServer        = NewAppError(5001, "Internal Server Error")
)

Functions

This section is empty.

Types

type AppError

type AppError struct {
	Code    int
	Message string
}

func NewAppError

func NewAppError(code int, message string) *AppError

func (*AppError) Error

func (e *AppError) Error() string

func (*AppError) WithArgs

func (e *AppError) WithArgs(args ...interface{}) *AppError

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL