Documentation ¶
Index ¶
- func HTTPErrorHandler(err error, c echo.Context) error
- type GenericError
- type HTTPError
- func BodyIsEmptyError() *HTTPError
- func ChainNotFoundError(chainID string) *HTTPError
- func ContractExecutionError(err error) *HTTPError
- func HTTPErrorFromEchoError(httpError *echo.HTTPError) *HTTPError
- func InternalServerError(err error) *HTTPError
- func InvalidOffLedgerRequestError(err error) *HTTPError
- func InvalidPeerPublicKeys(invalidPeerPubKeys []string) *HTTPError
- func InvalidPropertyError(propertyName string, err error) *HTTPError
- func NewHTTPError(httpCode int, message interface{}, err error) *HTTPError
- func PeerNotFoundError(publicKey *cryptolib.PublicKey) *HTTPError
- func ReceiptError(err error) *HTTPError
- func UserNotFoundError(username string) *HTTPError
- type HTTPErrorResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HTTPErrorHandler ¶
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 ¶
func BodyIsEmptyError ¶
func BodyIsEmptyError() *HTTPError
func ChainNotFoundError ¶
func ContractExecutionError ¶
func HTTPErrorFromEchoError ¶
func HTTPErrorFromEchoError(httpError *echo.HTTPError) *HTTPError
func InternalServerError ¶
func InvalidPeerPublicKeys ¶
func InvalidPropertyError ¶
func NewHTTPError ¶
func PeerNotFoundError ¶
func ReceiptError ¶
func UserNotFoundError ¶
func (*HTTPError) GetErrorResult ¶
func (he *HTTPError) GetErrorResult() *HTTPErrorResult
type HTTPErrorResult ¶
type HTTPErrorResult struct { Message interface{} Error string }
Click to show internal directories.
Click to hide internal directories.