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)
Tue, Dec 17, 5:53 AM
Unknown Object (File)
Sat, Nov 30, 12:18 PM
Unknown Object (File)
Wed, Nov 27, 7:34 PM
Unknown Object (File)
Mon, Nov 25, 4:02 PM
Unknown Object (File)
Nov 19 2024, 8:08 AM
Unknown Object (File)
Oct 17 2024, 12:50 PM
Unknown Object (File)
Oct 12 2024, 9:49 AM
Unknown Object (File)
Sep 28 2024, 2:40 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