Homec4science

Show URI in HTTP/HTTPSFuture exceptions

Authored by epriestley <git@epriestley.com> on Oct 4 2012, 21:57.

Description

Show URI in HTTP/HTTPSFuture exceptions

Summary:
These are difficult to debug when they stem from misconfigurations and get reported via email. Include the URI that we're trying to request in the exception.

See: https://groups.google.com/forum/?fromgroups=#!topic/phabricator-dev/e31s0kQFAeQ

Test Plan:
Tried to connect to bogus HTTP and HTTPS hosts. Verified errors include URI:

$ ./scripts/daemon/launch_daemon.php --conduit-uri=http://xvxclnalnlskdnv.com/api/ PhutilNiceDaemon
Bringing daemon 'PhutilNiceDaemon' online...
PHP Fatal error:  Uncaught exception 'HTTPFutureResponseStatusTransport' with message '[Transport/4] (http://xvxclnalnlskdnv.com/api/daemon.launched) Connection could not be initiated. This usually indicates a DNS problem: verify the domain name is correct, that you can perform a DNS lookup for it from this machine. (Did you add the domain to `/etc/hosts` on some other machine, but not this one?) This might also indicate that you specified the wrong port.' in /INSECURE/devtools/libphutil/src/future/http/HTTPFuture.php:238

$ ./scripts/daemon/launch_daemon.php --conduit-uri=https://xvxclnalnlskdnv.com/api/ PhutilNiceDaemon
Bringing daemon 'PhutilNiceDaemon' online...
PHP Fatal error:  Uncaught exception 'HTTPFutureResponseStatusCURL' with message '[cURL/6] (https://xvxclnalnlskdnv.com/api/daemon.launched) <CURLE_COULDNT_RESOLVE_HOST> There was an error resolving the server hostname. Check that you are connected to the internet and that DNS is correctly configured. (Did you add the domain to `/etc/hosts` on some other machine, but not this one?)' in /INSECURE/devtools/libphutil/src/future/http/HTTPSFuture.php:159

Reviewers: vrana, btrahan

Reviewed By: btrahan

CC: aran

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

Details

Committed
epriestley <git@epriestley.com>Oct 4 2012, 21:57
Pushed
aubortMar 17 2017, 12:03
Parents
rPHUa1629052abae: Throw from HTTPSFuture before starting service
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHU795212bf9d7a: Show URI in HTTP/HTTPSFuture exceptions (authored by epriestley <git@epriestley.com>).Oct 4 2012, 21:57