1 -- |Sum type for any error conditions in a API request.
2 module Cryptsy
.API
.Public
.Types
.Error
where
5 import Network
.HTTP
.Base
(Response
)
8 import Data
.Aeson
(Value
)
11 import Data
.ByteString
.Lazy
(ByteString
)
13 -- |error conditions w/ debugging information for an API request
14 data CryptsyError
= BadURL
{ badURL
:: String }
15 | BadResponse
{ badResponse
:: Response ByteString
}
16 | FailParseResponse
{ responseBody
:: ByteString
, errorMessage
:: String }
17 | ErrorResponse
{ errorValue
:: Value
}
18 | UnsuccessfulResponse
{ jsonResponse
:: Value
}
19 | FailParseReturn
{ dataValue
:: Value
, errorMessage
:: String }