errors

package
v2.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIError

type APIError struct {
	Name       string `json:"name"`
	AppCode    string `json:"appCode,omitempty"`
	StatusCode int    `json:"statusCode"`
	Detail     string `json:"detail"`
	Pointer    string `json:"pointer"`
}

APIError is the generic structure for any api error

func New

func New(defaults *APIError, overrides *APIError) *APIError

New instantiates a new error from the inputted map of values

func NewInternalError

func NewInternalError(overrides *APIError) *APIError

NewInternalError instantiates a new internal error instance, populating defaults

func NewUnauthorizedError added in v2.1.0

func NewUnauthorizedError(overrides *APIError) *APIError

NewUnauthorizedError instantiates a new unauthorized error instance, populating defaults

Jump to

Keyboard shortcuts

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