aboutsummaryrefslogtreecommitdiff
path: root/src/Tomato
diff options
context:
space:
mode:
authorJacques Comeaux <jacquesrcomeaux@gmail.com>2022-05-29 17:30:44 -0500
committerJacques Comeaux <jacquesrcomeaux@gmail.com>2022-05-29 17:30:44 -0500
commit5911078e6826dc7bf27abbf432240c6c1d701a91 (patch)
tree2ea03bedad0ba96d8278552448860ea7109906f7 /src/Tomato
parente970f53fdea63d9dd89382d522db2da570d05128 (diff)
Further improve error messages
Diffstat (limited to 'src/Tomato')
-rw-r--r--src/Tomato/Post.hs2
-rw-r--r--src/Tomato/Retrieve.hs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/Tomato/Post.hs b/src/Tomato/Post.hs
index c97860a..5f5d8af 100644
--- a/src/Tomato/Post.hs
+++ b/src/Tomato/Post.hs
@@ -50,7 +50,7 @@ uploadTomato = do
header "Content-Type" "image/png"
gmURL <- case Ae.fromJSON (responseBody js) of
Ae.Success r -> pure r
- Ae.Error s -> throwM $ DecodeException $ T.pack s
+ Ae.Error s -> throwM $ DecodeException $ "Get groupme url:" <> T.pack s
return gmURL
-- | Post a message to the group with image as attachment
diff --git a/src/Tomato/Retrieve.hs b/src/Tomato/Retrieve.hs
index 2f7f20b..014d836 100644
--- a/src/Tomato/Retrieve.hs
+++ b/src/Tomato/Retrieve.hs
@@ -44,7 +44,7 @@ queryTomato = do
"client_id" =: clientId
tomato <- case Ae.fromJSON (responseBody js) of
Ae.Success r -> pure r
- Ae.Error s -> throwM $ DecodeException $ T.pack s
+ Ae.Error s -> throwM $ DecodeException $ "Get tomato url" <> T.pack s
return tomato
-- | Download a specific tomato