diff options
Diffstat (limited to 'users/Profpatsch/whatcd-resolver/src/Http.hs')
-rw-r--r-- | users/Profpatsch/whatcd-resolver/src/Http.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/users/Profpatsch/whatcd-resolver/src/Http.hs b/users/Profpatsch/whatcd-resolver/src/Http.hs index f0f635e7d837..14ce191d520e 100644 --- a/users/Profpatsch/whatcd-resolver/src/Http.hs +++ b/users/Profpatsch/whatcd-resolver/src/Http.hs @@ -91,13 +91,13 @@ httpJson opts parser req = inSpan' "HTTP Request (JSON)" $ \span -> do | statusCode == 200, Nothing <- contentType -> Left [fmt|Server returned a body with unspecified content type|] - | code <- statusCode -> Left [fmt|Server returned an non-200 error code, code {code}: {resp & showPretty}|] + | code <- statusCode -> Left $ AppExceptionPretty [[fmt|Server returned an non-200 error code, code {code}:|], pretty resp] ) >>= assertM span ( \body -> Json.parseStrict parser body - & first (Json.parseErrorTree "could not parse redacted response") + & first (AppExceptionTree . Json.parseErrorTree "could not parse HTTP response") ) doRequestJson :: |