Page MenuHomePhabricator

Return Git HTTP error messages in an HTTP header
ClosedPublic

Authored by epriestley on Jan 26 2021, 11:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 27 2023, 1:40 PM
Unknown Object (File)
Dec 25 2023, 11:04 AM
Unknown Object (File)
Dec 22 2023, 3:27 AM
Unknown Object (File)
Dec 20 2023, 3:45 PM
Unknown Object (File)
Dec 19 2023, 5:49 PM
Unknown Object (File)
Dec 14 2023, 2:38 PM
Unknown Object (File)
Dec 9 2023, 2:32 PM
Unknown Object (File)
Dec 3 2023, 12:24 AM
Subscribers
None

Details

Summary

Ref T13590. Currently, when you encounter a HTTP error in Git, there is no apparent way to make the client show any additional useful information. In particular, the response body is ignored.

We can partially get around this by putting the information in an "X-Phabricator-Message: ..." HTTP header, which is visible with "GIT_CURL_VERBOSE=1 git ...". Users won't normally know to look here, but it's still better than nothing.

Test Plan
  • Ran "GIT_CURL_VERBOSE=1 git fetch" against a Phabricator HTTP URI that returned a HTTP/500 error.
    • Before: no clue what happened on the client.
    • After: client shows useful message in the "X-Phabricator-Message" header in debug output.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable