diff options
author | Félix Sipma <felix.sipma@no-log.org> | 2018-12-15 19:09:42 +0100 |
---|---|---|
committer | Félix Sipma <felix.sipma@no-log.org> | 2018-12-15 19:09:42 +0100 |
commit | 1446b19bcbec7bb697f40ca71d301b72f3e44669 (patch) | |
tree | 589c3d4992ab5fec2c2946a9a2b0553447d00629 | |
parent | 32a011e6ca117132e001f067f73fe4caa8b99c9f (diff) |
Handler: handle errors
-rw-r--r-- | src/Shop/Handler.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Shop/Handler.hs b/src/Shop/Handler.hs index d0a5dbb..bcba879 100644 --- a/src/Shop/Handler.hs +++ b/src/Shop/Handler.hs @@ -61,6 +61,7 @@ charge chargeform = do sendCustomMail' cfg (chmail cfg) sendCustomMail' cfg (comail cfg) return "Success" + -- ^ TODO -- ChargeResponse -- { chargeid = cid -- , chargeamount = show total @@ -175,7 +176,7 @@ instance Monoid (App a) where instance MonadHttp App where handleHttpException e = do $(logError) $ toS $ displayException e - mempty + throwError err500 { errBody = "Erreur serveur, contactez-moi directement !" } sendSMS :: SMS -> App () sendSMS sms = do |