diff --git a/services/galley/src/Galley/API/Error.hs b/services/galley/src/Galley/API/Error.hs index f6728a7d68..6a1c4d7c97 100644 --- a/services/galley/src/Galley/API/Error.hs +++ b/services/galley/src/Galley/API/Error.hs @@ -99,8 +99,8 @@ badConvState cid = "Connect conversation with more than 2 members: " <> LT.pack (show cid) -legalHoldServiceUnavailable :: Wai.Error -legalHoldServiceUnavailable = Wai.mkError status412 "legalhold-unavailable" "legal hold service does not respond or tls handshake could not be completed (did you pin the wrong public key?)" +legalHoldServiceUnavailable :: Show a => a -> Wai.Error +legalHoldServiceUnavailable e = Wai.mkError status412 "legalhold-unavailable" ("legal hold service unavailable with underlying error: " <> (LT.pack . show $ e)) invalidTeamNotificationId :: Wai.Error invalidTeamNotificationId = Wai.mkError status400 "invalid-notification-id" "Could not parse notification id (must be UUIDv1)." diff --git a/services/galley/src/Galley/External/LegalHoldService/Internal.hs b/services/galley/src/Galley/External/LegalHoldService/Internal.hs index a26e5212bd..2106138763 100644 --- a/services/galley/src/Galley/External/LegalHoldService/Internal.hs +++ b/services/galley/src/Galley/External/LegalHoldService/Internal.hs @@ -55,7 +55,7 @@ makeVerifiedRequestWithManager mgr (HttpsUrl url) reqBuilder = do . prependPath (uriPath url) errHandler e = do Log.info . Log.msg $ "error making request to legalhold service: " <> show e - throwM legalHoldServiceUnavailable + throwM (legalHoldServiceUnavailable e) prependPath :: ByteString -> Http.Request -> Http.Request prependPath pth req = req {Http.path = pth Http.path req} -- append two paths with exactly one slash