errors

package
v0.0.0-...-00b5140 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMissingPassword         = New("missing password", WithStatus(http.StatusBadRequest))
	ErrMissingFields           = New("missing fields", WithStatus(http.StatusPreconditionFailed))
	ErrEmptyField              = New("empty field", WithStatus(http.StatusPreconditionFailed))
	ErrInvalidPassword         = New("password invalid", WithStatus(http.StatusPreconditionFailed))
	ErrInternalError           = New("internal error", WithStatus(http.StatusForbidden))
	ErrInternalDependencyError = New("internal error", WithStatus(http.StatusFailedDependency))
	ErrSeedNotFound            = New("seed not found", WithStatus(http.StatusNotFound))
	ErrRecreatePassword        = New("recreate seed password", WithStatus(http.StatusResetContent))
	ErrInvalidCaptcha          = New("invalid captcha", WithStatus(http.StatusUnauthorized))
	ErrAlreadyConnected        = New("alreadyConnected", WithStatus(http.StatusFound))
	ErrNotEnoughFunds          = New("not enough funds", WithStatus(http.StatusUnauthorized))
	ErrorSeedPasswordInvalid   = New("invalid password", WithStatus(http.StatusResetContent))
	ErrCreatedBlockIsInvalid   = New("new block created is invalid", WithStatus(http.StatusRequestedRangeNotSatisfiable))
	ErrNotImplemented          = New("not implemented", WithStatus(http.StatusNotImplemented))
)

Functions

func GRPC

func GRPC(e error) error

func New

func New(text string, options ...func(*errorString)) error

New returns an error that formats as the given text. Each call to New returns a distinct error value even if the text is identical.

func StatusCode

func StatusCode(err error) int

func WithStatus

func WithStatus(status int) func(*errorString)

Types

This section is empty.

Jump to

Keyboard shortcuts

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