errors

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const ErrorCritical = 10 // ErrorCritical Some error in code
View Source
const ErrorCustomError = 3 // ErrorCustomError Custom api_errors that will continue the flow
View Source
const ErrorIncorrectVerifyCode = 4 // ErrorIncorrectVerifyCode Incorrect verify code or code is no longer in redis
View Source
const ErrorInvalidAccess = 6 // ErrorInvalidAccess Invalid access
View Source
const ErrorInvalidRequest = 2 // ErrorInvalidRequest Request does not meet the requirements
View Source
const ErrorNoError = -1
View Source
const ErrorNotFound = 11 // ErrorNotFound Object not found in db
View Source
const ErrorUnableAddData = 0 // ErrorUnableAddData Unable to add data to the table
View Source
const ErrorUnableGetData = 5 // ErrorUnableGetData Unable to get data from the table
View Source
const ErrorUnableSendMessage = 1 // ErrorUnableSendMessage Unable to send message
View Source
const ErrorUserIsNotVerify = 8 // ErrorUserIsNotVerify User in db is not active
View Source
const ErrorUserNotFound = 7 // ErrorUserNotFound User not found in db
View Source
const ErrorUserUnauthorized = 9 // ErrorUserUnauthorized User has not an auth token

Variables

This section is empty.

Functions

func GetCustomError

func GetCustomError(w http.ResponseWriter, msg string, code int32)

func Init

func Init(additionalErrorsMap map[int32]CustomErrors)

Types

type CustomErrors

type CustomErrors struct {
	HttpCode    int    `json:"httpCode"`
	Message     string `json:"message"`
	Description string `json:"description"`
}

Jump to

Keyboard shortcuts

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