errors

package
v0.90.74 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NotAuthenticated = &appError{
		Err:  "user not authenticated",
		Code: 401,
	}
	DecodeJSON = &appError{
		Err:  "could not decode incoming JSON",
		Code: 422,
	}
	IDMissing = &appError{
		Err:  "ID missing in URL",
		Code: 422,
	}
	NotNumber = &appError{
		Err:  "ID needs to be an integer",
		Code: 422,
	}
)

Functions

func Missing

func Missing(object interface{}, id interface{}) error

Types

type Error

type Error interface {
	Error() string
	Status() int
}

func Err

func Err(err Error) Error

func New

func New(err string) Error

func Wrap

func Wrap(err error, message string) Error

Jump to

Keyboard shortcuts

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