Documentation ¶
Index ¶
Constants ¶
View Source
const ( ErrBadRequest = "Bad request" ErrWrongCredentials = "Wrong Credentials" ErrNotFound = "Not Found" ErrForbidden = "Forbidden" ErrBadQueryParams = "Invalid query params" )
Variables ¶
View Source
var ( BadRequest = errors.New("Bad request") WrongCredentials = errors.New("Wrong Credentials") NotFound = errors.New("Not Found") Forbidden = errors.New("Forbidden") PermissionDenied = errors.New("Permission Denied") ExpiredCSRFError = errors.New("Expired CSRF token") WrongCSRFToken = errors.New("Wrong CSRF token") CSRFNotPresented = errors.New("CSRF not presented") NotRequiredFields = errors.New("No such required fields") BadQueryParams = errors.New("Invalid query params") InternalServerError = errors.New("Internal Server Error") RequestTimeoutError = errors.New("Request Timeout") InvalidJWTToken = errors.New("Invalid JWT token") InvalidJWTClaims = errors.New("Invalid JWT claims") NoCookie = errors.New("not found cookie header") )
Functions ¶
Types ¶
type RestErr ¶
Rest error interface
func NewInternalServerError ¶
func NewInternalServerError(causes interface{}) RestErr
New Internal Server Error
func NewRestError ¶
New Rest Error
func NewRestErrorWithMessage ¶
New Rest Error With Message
func ParseErrors ¶
Parser of error string messages returns RestError
Click to show internal directories.
Click to hide internal directories.