Documentation
¶
Overview ¶
Package errors provides standardized domain errors that express business intent rather than infrastructure details. These errors should be used by use cases and mapped to appropriate HTTP status codes by handlers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNotFound indicates the requested resource does not exist. ErrNotFound = errors.New("not found") // ErrConflict indicates a conflict with existing data (e.g., duplicate key). ErrConflict = errors.New("conflict") // ErrInvalidInput indicates the input data is invalid or fails validation. ErrInvalidInput = errors.New("invalid input") ErrUnauthorized = errors.New("unauthorized") // ErrForbidden indicates the authenticated user doesn't have permission. ErrForbidden = errors.New("forbidden") )
Standard domain errors that can be used across all domain modules.
Functions ¶
func As ¶
As finds the first error in err's tree that matches target. This is a convenience wrapper around errors.As.
func Is ¶
Is reports whether any error in err's tree matches target. This is a convenience wrapper around errors.Is.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.