errors

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUserNotFound      = DomainError{Code: "USER_NOT_FOUND", Message: "User not found"}
	ErrInvalidEmail      = DomainError{Code: "INVALID_EMAIL", Message: "Invalid email format", Field: "email"}
	ErrDuplicateEmail    = DomainError{Code: "DUPLICATE_EMAIL", Message: "Email already exists", Field: "email"}
	ErrInvalidName       = DomainError{Code: "INVALID_NAME", Message: "Name cannot be empty", Field: "name"}
	ErrInvalidUserID     = DomainError{Code: "INVALID_USER_ID", Message: "Invalid user ID format", Field: "id"}
	ErrUserAlreadyExists = DomainError{Code: "USER_ALREADY_EXISTS", Message: "User already exists"}
)

User domain errors

View Source
var (
	ErrRepositoryConnection = DomainError{Code: "REPOSITORY_CONNECTION", Message: "Repository connection failed"}
	ErrRepositoryOperation  = DomainError{Code: "REPOSITORY_OPERATION", Message: "Repository operation failed"}
)

Repository errors

Functions

This section is empty.

Types

type DomainError

type DomainError struct {
	Code    string
	Message string
	Field   string
}

DomainError represents a domain-specific error with code, message, and optional field

func (DomainError) Error

func (e DomainError) Error() string

Jump to

Keyboard shortcuts

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