on master help sign in
give more info when HTTP fails with bad status code
commitba1c3d74b0cf1a1eeb3cc71b4e3c8a9cd55cc9c9 authorEvan Czaplicki <evancz@users.noreply.github.com> dateSat 15 Feb 2020, 12:27 (7 years ago) parentc8be24e
1 file changed+2−1
builder/src/Reporting/Exit.hs+2−1
builder/src/Reporting/Exit.hs+2−1
@@ -1522,7 +1522,7 @@ toHttpErrorReport title err context =
15221522
15231523 Http.BadHttp url httpExceptionContent ->
15241524 case httpExceptionContent of
1525− HTTP.StatusCodeException response _ ->
1525+ HTTP.StatusCodeException response body ->
15261526 let
15271527 (HTTP.Status code message) = HTTP.responseStatus response
15281528 in
@@ -1530,6 +1530,7 @@ toHttpErrorReport title err context =
15301530 [ D.fillSep $
15311531 ["But","it","came","back","as",D.red (D.fromInt code)]
15321532 ++ map D.fromChars (words (BS_UTF8.toString message))
1533+ , D.indent 4 $ D.reflow $ BS_UTF8.toString body
15331534 , D.reflow $
15341535 "This may mean some online endpoint changed in an unexpected way, so if does not\
15351536 \ seem like something on your side is causing this (e.g. firewall) please report\