errors

package
v0.2.1-0...-e2a08ac Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAlreadyExistsError

func NewAlreadyExistsError(resourceType string, ids ...string) error

func NewAlreadyInUseError

func NewAlreadyInUseError(resourceType string, ids ...string) error

func NewExpiredError

func NewExpiredError(resourceType string, ids ...string) error

func NewNotFoundError

func NewNotFoundError(resourceType string, ids ...string) error

func TrackError

func TrackError(err error) error

func TrackErrorVar

func TrackErrorVar(err error, vars map[string]any) error

func Wrap

func Wrap(err1 error, err2 error) error

func WrapPostgresErrorCode

func WrapPostgresErrorCode(err error, resourceType string, id ...string) error

Returns an error wrapping the error specified, and one of these errors: errors:

**validation.NewErrValidation**: if NOT NULL constraint or foreign key is violated
**errors.AlreadyExistsError**: if a UNIQUE constraint is violated

Types

type AlreadyExistsError

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

func (AlreadyExistsError) Error

func (e AlreadyExistsError) Error() string

type AlreadyInUseError

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

func (AlreadyInUseError) Error

func (e AlreadyInUseError) Error() string

type ExpiredError

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

func (ExpiredError) Error

func (e ExpiredError) Error() string

type NotFoundError

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

func (NotFoundError) Error

func (e NotFoundError) Error() string

type StatusError

type StatusError interface {
	GetStatus() int
	Error() string
}

func APIErrorHandler

func APIErrorHandler(err error) StatusError

type TrackedError

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

func (*TrackedError) Error

func (e *TrackedError) Error() string

func (*TrackedError) Unwrap

func (e *TrackedError) Unwrap() error

type TrackedVarFile

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

Jump to

Keyboard shortcuts

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