From d0279f0658e480db7028550367ae0afc528cf7de Mon Sep 17 00:00:00 2001 From: Jacques Comeaux Date: Sun, 29 May 2022 17:56:59 -0500 Subject: Add response body in error message --- src/Tomato/Retrieve.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') 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 -- cgit v1.2.3