errors

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2025 License: Apache-2.0 Imports: 1 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrUnauthorized is returned when a user does not have
	// authorization to perform a request
	ErrUnauthorized = NewUnauthorizedError("Unauthorized")
	// ErrNotFound is returned if an object is not found in
	// the database.
	ErrNotFound = NewNotFoundError("not found")
	// ErrDuplicateUser is returned when creating a user, if the
	// user already exists.
	ErrDuplicateEntity = NewDuplicateUserError("duplicate")
	// ErrBadRequest is returned is a malformed request is sent
	ErrBadRequest = NewBadRequestError("invalid request")
	// ErrTimeout is returned when a timeout occurs.
	ErrTimeout          = NewTimeoutError("timed out")
	ErrUnprocessable    = NewUnprocessableError("cannot process request")
	ErrNoPoolsAvailable = NewNoPoolsAvailableError("no pools available")
)

Functions

func NewBadRequestError

func NewBadRequestError(msg string, a ...interface{}) error

NewBadRequestError returns a new BadRequestError

func NewConflictError

func NewConflictError(msg string, a ...interface{}) error

NewConflictError returns a new ConflictError

func NewDuplicateUserError

func NewDuplicateUserError(msg string) error

NewDuplicateUserError returns a new DuplicateUserError

func NewMissingSecretError

func NewMissingSecretError(msg string, a ...interface{}) error

NewMissingSecretError returns a new MissingSecretError

func NewNoPoolsAvailableError added in v0.1.7

func NewNoPoolsAvailableError(msg string, a ...interface{}) error

NewNoPoolsAvailableError returns a new UnprocessableError

func NewNotFoundError

func NewNotFoundError(msg string, a ...interface{}) error

NewNotFoundError returns a new NotFoundError

func NewProviderError

func NewProviderError(msg string, a ...interface{}) error

NewProviderError returns a new ProviderError

func NewTimeoutError added in v0.1.7

func NewTimeoutError(msg string, a ...interface{}) error

NewTimeoutError returns a new TimoutError

func NewUnauthorizedError

func NewUnauthorizedError(msg string) error

NewUnauthorizedError returns a new UnauthorizedError

func NewUnprocessableError added in v0.1.7

func NewUnprocessableError(msg string, a ...interface{}) error

NewUnprocessableError returns a new UnprocessableError

Types

type BadRequestError

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

BadRequestError is returned when a malformed request is received

func (*BadRequestError) Error

func (b *BadRequestError) Error() string

func (*BadRequestError) Is added in v0.1.7

func (p *BadRequestError) Is(target error) bool

type ConflictError

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

ConflictError is returned when a conflicting request is made

func (*ConflictError) Error

func (b *ConflictError) Error() string

func (*ConflictError) Is added in v0.1.7

func (p *ConflictError) Is(target error) bool

type DuplicateUserError

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

DuplicateUserError is returned when a duplicate user is requested

func (*DuplicateUserError) Error

func (b *DuplicateUserError) Error() string

func (*DuplicateUserError) Is added in v0.1.7

func (p *DuplicateUserError) Is(target error) bool

type MissingSecretError

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

MissingSecretError is returned the secret to validate a webhook is missing

func (*MissingSecretError) Error

func (b *MissingSecretError) Error() string

func (*MissingSecretError) Is added in v0.1.7

func (p *MissingSecretError) Is(target error) bool

type NoPoolsAvailableError added in v0.1.7

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

NoPoolsAvailableError is returned when anthere are not pools available.

func (*NoPoolsAvailableError) Error added in v0.1.7

func (b *NoPoolsAvailableError) Error() string

func (*NoPoolsAvailableError) Is added in v0.1.7

func (p *NoPoolsAvailableError) Is(target error) bool

type NotFoundError

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

NotFoundError is returned when a resource is not found

func (*NotFoundError) Error

func (b *NotFoundError) Error() string

func (*NotFoundError) Is added in v0.1.7

func (p *NotFoundError) Is(target error) bool

type ProviderError

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

UnauthorizedError is returned when a request is unauthorized

func (*ProviderError) Error

func (b *ProviderError) Error() string

func (*ProviderError) Is added in v0.1.7

func (p *ProviderError) Is(target error) bool

type TimoutError added in v0.1.7

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

TimoutError is returned when an operation times out.

func (*TimoutError) Error added in v0.1.7

func (b *TimoutError) Error() string

func (*TimoutError) Is added in v0.1.7

func (p *TimoutError) Is(target error) bool

type UnauthorizedError

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

UnauthorizedError is returned when a request is unauthorized

func (*UnauthorizedError) Error

func (b *UnauthorizedError) Error() string

func (*UnauthorizedError) Is added in v0.1.7

func (p *UnauthorizedError) Is(target error) bool

type UnprocessableError added in v0.1.7

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

TimoutError is returned when an operation times out.

func (*UnprocessableError) Error added in v0.1.7

func (b *UnprocessableError) Error() string

func (*UnprocessableError) Is added in v0.1.7

func (p *UnprocessableError) Is(target error) bool

Jump to

Keyboard shortcuts

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