custom_errors

package
v0.0.0-...-266b4ff Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrEmptyUserField checks if all necessary fields of user struct are filled out.
	ErrEmptyUserField = errors.New("username, password and email can't be empty")
	// ErrFieldWithSpaces checks if no spaces were used since spaces can introduce ambiguity and potential security risks.
	ErrFieldWithSpaces = errors.New("username and password can't have spaces")
	// ErrShortPassword checks the length of password to avoid potential security risks.
	ErrShortPassword = errors.New("password shorter than 8 characters")
	// ErrInvalidEmail checks if email consists of valid characters.
	ErrInvalidEmail = errors.New("invalid email address")
	// ErrNotFound is used when the requested item is not found.
	ErrNotFound = errors.New("items not found")
	// ErrUserNotFound is used when the user doesn't have account in the system.
	ErrUserNotFound = errors.New("user not found")
	// ErrInvalidToken is used for invalid tokens.
	ErrInvalidToken = errors.New("Unexpected signing method")
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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