sp2-verify-1770324218/services/api/internal/domain/errors.go
jordan 61ee2b3029
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Add components: service/api, worker/background-processor
2026-02-05 20:43:45 +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")
)