errors

package
v0.0.0-...-64409e6 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2020 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBadRequest = errors.New("Bad Request")

ErrBadRequest error

View Source
var ErrForbidden = errors.New("Forbidden")

ErrForbidden error

View Source
var ErrInternalServer = errors.New("Internal Server Error")

ErrInternalServer error

View Source
var ErrLocked = errors.New("Locked")

ErrLocked error

View Source
var ErrMethodNotAllowed = errors.New("Method Not Allowed")

ErrMethodNotAllowed error

View Source
var ErrNotFound = errors.New("Not Found")

ErrNotFound error

View Source
var ErrUnauthorized = errors.New("Unauthorized")

ErrUnauthorized error

View Source
var ErrUnprocessableEntitiy = errors.New("Unprocessable Entity")

ErrUnprocessableEntitiy error

Functions

func GetHTTPStatusCodeByError

func GetHTTPStatusCodeByError(err error) int

GetHTTPStatusCodeByError returns http status code by given error.

Example of return:

When the given error is "errors.ErrNotFound" then the return will be constant value of "http.StatusNotFound". Return value will be "http.StatusInternalServerError" when the given error is not included in helper/errors

Types

This section is empty.

Jump to

Keyboard shortcuts

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