feat: new general and auth errors;
feat: NewPointer helper function in utils; refactor: length validation in auth models
This commit is contained in:
@@ -24,6 +24,7 @@ import (
|
||||
var (
|
||||
ErrUnauthorized = errors.New("User is not authorized")
|
||||
ErrUsernameTaken = errors.New("Provided username is already in use")
|
||||
ErrUserNotFound = errors.New("User was not found")
|
||||
ErrInvalidCredentials = errors.New("Invalid username, password or TOTP code")
|
||||
ErrInvalidToken = errors.New("Token is invalid or expired")
|
||||
ErrServerError = errors.New("Internal server error")
|
||||
|
||||
@@ -24,4 +24,5 @@ import (
|
||||
var (
|
||||
ErrNotImplemented = errors.New("Feature is not implemented")
|
||||
ErrBadRequest = errors.New("Bad request")
|
||||
ErrForbidden = errors.New("Access is denied")
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user