Homec4science

Improve usefulness of HTTPStatus exceptions

Authored by epriestley <git@epriestley.com> on Aug 19 2012, 23:30.

Description

Improve usefulness of HTTPStatus exceptions

Summary:
Some Phabricator errors produce a 500 response, which we curently render like this from Conduit:

$ arc diff --only
Exception
[HTTP/500]
(Run with --trace for a full exception trace.)
$

This is pretty worthless, and --trace does not help. Instead, show the first part of the body:

$ arc diff --only
Exception
[HTTP/500] Internal Server Error
As received by the server, the request had a nonzero content length but no data. Normally this indicates that it exceeds the 'post_max_size' setting in the PHP configuration on the server. Increase the 'post_max_size' setting, or reduce the size of the request (request size according to 'Content-Length' was 518, 'post_max_size' is set to 256).
(Run with --trace for a full exception trace.)
$

Test Plan: See above.

Reviewers: vrana, btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D3319

Details

Committed
epriestley <git@epriestley.com>Aug 19 2012, 23:30
Pushed
aubortMar 17 2017, 12:03
Parents
rPHU61107311ec6e: [hql -> sql] make hql the same as sql
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHUde73395b8aa3: Improve usefulness of HTTPStatus exceptions (authored by epriestley <git@epriestley.com>).Aug 19 2012, 23:30