errors

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BlameUser   = http.StatusBadRequest
	BlameServer = http.StatusInternalServerError
)

Variables

View Source
var (
	ErrInvalidServer = New("InvalidServer", "malformed parameter `server` provided", BlameUser)
	ErrCantMarshal   = New("CantMarshal", "failed to populate matrix with metadata provided", BlameServer)
)

Functions

This section is empty.

Types

type Error

type Error struct {
	Type    string      `json:"type"`
	Details interface{} `json:"details"`
	Blame   int         `json:"-"`
}

func New

func New(typ string, details interface{}, blame int) *Error

func (*Error) Wrapped

func (e *Error) Wrapped() *WrappedError

type WrappedError

type WrappedError struct {
	Error *Error `json:"error"`
}

Jump to

Keyboard shortcuts

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