Versions in this module Expand all Collapse all v1 v1.1.0 Nov 6, 2026 v1.0.0 Nov 6, 2026 Changes in this version + func As(err error, target any) bool + func Is(err, target error) bool + func Recover(dst *error, report func(error)) + func Unwrap(err error) error + type AppError struct + Category Category + Cause error + Code string + CorrelationID string + DebugMessage string + Details map[string]any + HTTPStatus int + Message string + Metadata map[string]any + RetryAfter time.Duration + Retryable bool + Severity Severity + TraceID string + func Classify(err error) *AppError + func New(message string, opts ...Option) *AppError + func Wrap(cause error, message string, opts ...Option) *AppError + func Wrapf(cause error, format string, args ...any) *AppError + func (e *AppError) Error() string + func (e *AppError) Unwrap() error + type Category string + const Authentication + const Authorization + const Business + const Cache + const Conflict + const Database + const Infrastructure + const Internal + const Messaging + const Network + const NotFound + const RateLimit + const Timeout + const Unavailable + const Validation + type Option func(*AppError) + func WithCategory(v Category) Option + func WithCause(v error) Option + func WithCode(v string) Option + func WithDebug(v string) Option + func WithDetails(v map[string]any) Option + func WithHTTPStatus(v int) Option + func WithMessage(v string) Option + func WithRetryAfter(v time.Duration) Option + func WithRetryable(v bool) Option + func WithSeverity(v Severity) Option + type Severity string + const Critical + const Debug + const Error + const Info + const Warning