apierrors

package
v0.4.0-alpha.6 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTTPErrorHandler

func HTTPErrorHandler(err error, c echo.Context) error

HTTPErrorHandler must be hooked to an echo server to render instances of HTTPError as JSON

Types

type GenericError

type GenericError struct {
	Error string
}

type HTTPError

type HTTPError struct {
	HTTPCode        int
	Message         interface{}
	AdditionalError string
}

func BodyIsEmptyError

func BodyIsEmptyError() *HTTPError

func ChainNotFoundError

func ChainNotFoundError(chainID string) *HTTPError

func ContractExecutionError

func ContractExecutionError(err error) *HTTPError

func HTTPErrorFromEchoError

func HTTPErrorFromEchoError(httpError *echo.HTTPError) *HTTPError

func InternalServerError

func InternalServerError(err error) *HTTPError

func InvalidOffLedgerRequestError

func InvalidOffLedgerRequestError(err error) *HTTPError

func InvalidPeerPublicKeys

func InvalidPeerPublicKeys(invalidPeerPubKeys []string) *HTTPError

func InvalidPropertyError

func InvalidPropertyError(propertyName string, err error) *HTTPError

func NewHTTPError

func NewHTTPError(httpCode int, message interface{}, err error) *HTTPError

func PeerNotFoundError

func PeerNotFoundError(publicKey *cryptolib.PublicKey) *HTTPError

func ReceiptError

func ReceiptError(err error) *HTTPError

func UserNotFoundError

func UserNotFoundError(username string) *HTTPError

func (*HTTPError) Error

func (he *HTTPError) Error() string

func (*HTTPError) GetErrorResult

func (he *HTTPError) GetErrorResult() *HTTPErrorResult

type HTTPErrorResult

type HTTPErrorResult struct {
	Message interface{}
	Error   string
}

Jump to

Keyboard shortcuts

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