feat: new general and auth errors;

feat: NewPointer helper function in utils;
refactor: length validation in auth models
This commit is contained in:
2025-06-30 01:34:59 +03:00
parent e2d83aa779
commit 284d959bc3
4 changed files with 10 additions and 5 deletions

View File

@@ -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")