Achieve 100% haddock coverage; do not inline CAFs that should be shared.
[haskell-cryptsy-api.git] / src / Cryptsy / API / Public / Types / Error.hs
blob439aec7e5f72ab0de01182d54d9877bcfcfa089c
1 -- |Sum type for any error conditions in a API request.
2 module Cryptsy.API.Public.Types.Error where
4 -- HTTP
5 import Network.HTTP.Base (Response)
7 -- aeson
8 import Data.Aeson (Value)
10 -- bytestring
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 }
20 deriving Show