Copyright | (c) 2023 GYELD GMBH |
---|---|
License | Apache 2.0 |
Maintainer | [email protected] |
Stability | develop |
Safe Haskell | Safe-Inferred |
Language | GHC2021 |
GeniusYield.HTTP.Errors
Description
Synopsis
- class IsGYApiError e where
- toApiError ∷ e → GYApiError
- data GYApiError = GYApiError {}
- someBackendError ∷ Text → GYApiError
Documentation
class IsGYApiError e where #
Class of types that can be converted into an HTTP API error.
Minimal complete definition
Nothing
Instances
IsGYApiError BuildTxException # | |
Defined in GeniusYield.Transaction Methods |
data GYApiError #
An example error code can be: INSUFFICIENT_BALANCE (i.e. it is not the HTTP status error message)
The message can be any textual representation of the error with more information.
The status code should be the HTTP status code.
Constructors
GYApiError | |
Fields |
Instances
Show GYApiError # | |
Defined in GeniusYield.HTTP.Errors | |
Eq GYApiError # | |
Defined in GeniusYield.HTTP.Errors |
someBackendError ∷ Text → GYApiError #
Create a typical BACKEND_ERROR internal serval error with given message.