slate-verify-1770510662/services/preferences-api/internal/domain/errors.go
jordan 3a5cdd2919
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Add service component: preferences-api
2026-02-08 00:31:10 +00:00

22 lines
831 B
Go

// Package domain contains pure domain models with no external dependencies.
// These types represent the core business concepts of the service.
package domain
import "errors"
// Domain errors - these are business-level errors that should be translated
// to appropriate HTTP status codes by the handler layer.
var (
// ErrNotFound indicates a requested resource does not exist.
ErrNotFound = errors.New("not found")
// ErrExampleNotFound indicates the requested example does not exist.
ErrExampleNotFound = errors.New("example not found")
// ErrDuplicateExample indicates an example with the same name already exists.
ErrDuplicateExample = errors.New("example with this name already exists")
// ErrInvalidExampleName indicates the example name is invalid.
ErrInvalidExampleName = errors.New("invalid example name")
)