slack5-1770603014/services/preferences-api/internal/domain/errors.go
rdev-worker e5fc44d10e
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
build: /implement-feature user-preferences
2026-02-09 02:37:38 +00:00

19 lines
785 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 (
// ErrInvalidTheme indicates the theme value is not one of: light, dark, system.
ErrInvalidTheme = errors.New("invalid theme: must be light, dark, or system")
// ErrInvalidLanguage indicates the language value is empty.
ErrInvalidLanguage = errors.New("invalid language: must be non-empty")
// ErrInvalidDigest indicates the digest value is not one of: daily, weekly, never.
ErrInvalidDigest = errors.New("invalid digest: must be daily, weekly, or never")
)