apperror

package
v0.0.0-...-caa8b03 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 1, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTraitForbidden          = errorx.RegisterTrait("forbidden")
	ErrTraitAuthorizationIssue = errorx.RegisterTrait("auth")
	ErrTraitEntityNotFound     = errorx.RegisterTrait("not_found")
	ErrTraitValidationError    = errorx.RegisterTrait("validation")

	AppErrors       = errorx.NewNamespace("app")
	UnexpectedError = AppErrors.NewType("unexpected")

	ErrGenericForbidden = AppErrors.NewType("generic_forbidden", ErrTraitForbidden).New("access to this resource is forbidden")
	ErrDbError          = AppErrors.NewType("db_error")

	ValidationError = AppErrors.NewType("validation", ErrTraitValidationError)
)

Functions

func IsNotFoundError

func IsNotFoundError(err error) bool

func WrapUnexpectedAppError

func WrapUnexpectedAppError(err error) error

func WrapUnexpectedDBError

func WrapUnexpectedDBError(err error) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL