diff options
author | Jacques Comeaux <jacquesrcomeaux@gmail.com> | 2022-05-29 17:56:59 -0500 |
---|---|---|
committer | Jacques Comeaux <jacquesrcomeaux@gmail.com> | 2022-05-29 17:56:59 -0500 |
commit | d0279f0658e480db7028550367ae0afc528cf7de (patch) | |
tree | a9f8c5c82e53ef0267573832b5d6c68019439b2c /src | |
parent | 5911078e6826dc7bf27abbf432240c6c1d701a91 (diff) |
Add response body in error message
Diffstat (limited to 'src')
-rw-r--r-- | src/Tomato/Retrieve.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Tomato/Retrieve.hs b/src/Tomato/Retrieve.hs index 014d836..c43607e 100644 --- a/src/Tomato/Retrieve.hs +++ b/src/Tomato/Retrieve.hs @@ -44,7 +44,10 @@ queryTomato = do "client_id" =: clientId tomato <- case Ae.fromJSON (responseBody js) of Ae.Success r -> pure r - Ae.Error s -> throwM $ DecodeException $ "Get tomato url" <> T.pack s + Ae.Error s -> throwM $ DecodeException $ + "Get tomato url: " <> + T.pack s <> + T.pack (show (responseBody js)) return tomato -- | Download a specific tomato |