Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions services/galley/src/Galley/API/Error.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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)."
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down