apierror

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: GPL-3.0 Imports: 1 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrContextMissing = APIError{
	// contains filtered or unexported fields
}
View Source
var ErrContextMissingEnvelope = APIError{
	// contains filtered or unexported fields
}
View Source
var ErrContextMissingLogger = APIError{
	// contains filtered or unexported fields
}
View Source
var ErrContextMissingRequestID = APIError{
	// contains filtered or unexported fields
}
View Source
var ErrDataNotFound = APIError{
	// contains filtered or unexported fields
}
View Source
var ErrForbidden = APIError{
	// contains filtered or unexported fields
}
View Source
var ErrNotFound = APIError{
	// contains filtered or unexported fields
}
View Source
var ErrRouteNotFound = APIError{
	// contains filtered or unexported fields
}
View Source
var ErrServerError = APIError{
	// contains filtered or unexported fields
}

Functions

This section is empty.

Types

type APIError

type APIError struct {
	// contains filtered or unexported fields
}

func New

func New(err error, status int) APIError

func NewGeneric

func NewGeneric(err error) APIError

func NewGenericMulti added in v0.0.15

func NewGenericMulti(msg string, statusCode int, errors []string) APIError

func NewMulti added in v0.0.15

func NewMulti(err APIError, errors []string) APIError

func (APIError) Error

func (e APIError) Error() string

func (APIError) Errors added in v0.0.15

func (e APIError) Errors() []string

func (APIError) HTTPStatus

func (e APIError) HTTPStatus() int

type HTTPError

type HTTPError interface {
	Error() string
	Errors() []string
	HTTPStatus() int
}

type MultiError added in v0.0.15

type MultiError struct {
	// contains filtered or unexported fields
}

func NewMultiError added in v0.0.15

func NewMultiError() *MultiError

func (*MultiError) Add added in v0.0.15

func (m *MultiError) Add(err error)

func (*MultiError) GetErrors added in v0.0.15

func (m *MultiError) GetErrors() []string

func (*MultiError) HasError added in v0.0.15

func (m *MultiError) HasError() bool

Jump to

Keyboard shortcuts

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