errs

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2024 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBadRequest         = errors.New("bad request")
	ErrNotFound           = errors.New("not found")
	ErrUnauthorized       = errors.New("unauthorized")
	ErrServiceUnavailable = errors.New("service unavailable")
)

Generic errors that can be wrapped in the domain

Functions

func NewBadRequest

func NewBadRequest(wrapped error) error

func NewError

func NewError(domainErr error, appErr error) error

func NewNotFound

func NewNotFound(wrapped error) error

func NewServiceUnavailable

func NewServiceUnavailable(wrapped error) error

func NewUnauthorized

func NewUnauthorized(wrapped error) error

Types

type Error

type Error struct {
	// contains filtered or unexported fields
}

func (Error) AppErr

func (e Error) AppErr() error

func (Error) DomainErr

func (e Error) DomainErr() error

func (Error) Error

func (e Error) Error() string

Jump to

Keyboard shortcuts

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