errors

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: Apache-2.0 Imports: 1 Imported by: 6 modules, 20 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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          = fmt.Errorf("timed out")
	ErrUnprocessable    = fmt.Errorf("cannot process request")
	ErrNoPoolsAvailable = fmt.Errorf("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 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 NewUnauthorizedError

func NewUnauthorizedError(msg string) error

NewUnauthorizedError returns a new UnauthorizedError

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

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

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

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

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

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

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

Jump to

Keyboard shortcuts

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