sapling/eden
Arun Kulshreshtha 44991896c4 edenapi: truncate long server error messages
Summary:
Previously, if the server returned an HTTP status code indicating an error, we'd use the entire response body as the error message. Sometimes these response bodies are huge (for example, if we hit the wrong server and get served an HTML webpage), and in these cases the error message is basically useless. An actual error message from the server should be fairly short.

To avoid spewing the entire response body onto the user's terminal, let's truncate long messages. Additionally, if the error message looks like a web page (as determined via a crude heuristic), let's omit it entirely and replace it with a more helpful message.

Reviewed By: quark-zju

Differential Revision: D30078934

fbshipit-source-id: 40836bb9187f7479360ce73f581fd15980ab183c
2021-08-04 10:34:52 -07:00
..
fs remove try-import FuseCall in cli 2021-08-03 18:33:54 -07:00
hg-server remove use of chashmap 2021-08-03 13:07:18 -07:00
integration allow eden stats output subset of stats and in JSON 2021-08-03 15:29:45 -07:00
locale add a copyright header to glibc_en.po 2019-04-26 14:38:27 -07:00
mononoke Split no_bad_filenames repo hook 2021-08-04 09:35:07 -07:00
scm edenapi: truncate long server error messages 2021-08-04 10:34:52 -07:00
test_support fix systemd tests locally 2021-07-09 17:24:11 -07:00
test-data fix fsck snapshot integration tests 2021-07-14 16:20:04 -07:00
.gitignore eden: wire up mac contbuild 2019-02-05 21:52:30 -08:00
Eden.project.toml Eden.project.toml file for Nuclide 2018-04-26 11:05:23 -07:00