Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data ApiError = ApiError {
- apiErrorError ∷ !(Maybe Text)
- apiErrorMessage ∷ !Text
- apiErrorCode ∷ !(Maybe Word)
- data MaestroError
- fromServantClientError ∷ ClientError → MaestroError
Documentation
In cases of failure, at times, Maestro returns a JSON object with an error message.
ApiError | |
|
Instances
Eq ApiError # | |
Show ApiError # | |
Generic ApiError # | |
ToJSON ApiError # | |
Defined in Maestro.Client.Error toEncoding ∷ ApiError → Encoding toJSONList ∷ [ApiError] → Value toEncodingList ∷ [ApiError] → Encoding | |
FromJSON ApiError # | |
Defined in Maestro.Client.Error parseJSON ∷ Value → Parser ApiError parseJSONList ∷ Value → Parser [ApiError] | |
type Rep ApiError # | |
Defined in Maestro.Client.Error type Rep ApiError = D1 ('MetaData "ApiError" "Maestro.Client.Error" "maestro-sdk-1.7.3-inplace" 'False) (C1 ('MetaCons "ApiError" 'PrefixI 'True) (S1 ('MetaSel ('Just "apiErrorError") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "apiErrorMessage") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "apiErrorCode") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Word))))) |
data MaestroError #
Maestro errors.
MaestroError !Text | Other Maestro error. |
MaestroBadRequest !Text | 400 status code. |
MaestroApiKeyMissing !Text | 401 status code. |
MaestroNotFound | 404 status code. |
MaestroUnsupportedMediaType | 415 status code. |
MaestroUsageLimitReached | 429 status code. |
MaestroInternalError !Text | 500 status code. |
ServantClientError !ClientError | When |
Instances
Eq MaestroError # | |
Defined in Maestro.Client.Error (==) ∷ MaestroError → MaestroError → Bool # (/=) ∷ MaestroError → MaestroError → Bool # | |
Show MaestroError # | |
Defined in Maestro.Client.Error showsPrec ∷ Int → MaestroError → ShowS # show ∷ MaestroError → String # showList ∷ [MaestroError] → ShowS # | |
Exception MaestroError # | |
Defined in Maestro.Client.Error |
fromServantClientError ∷ ClientError → MaestroError #