1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-21 22:32:41 +01:00

In ConduitCallFuture, only call Conduit exception messages on Conduit exceptions

Summary: Ref T13582. When this code is reached with a raw HTTP exception, it currently fatals.

Test Plan:
  - Ran `arc branches --conduit-uri=http://example.org` (a bad Conduit URI).
  - Before: hard fatal with a bad method call.
  - After: non-Conduit exception raised to user. Not ideal, but a step forward.

Maniphest Tasks: T13582

Differential Revision: https://secure.phabricator.com/D21467
This commit is contained in:
epriestley 2020-09-17 13:11:23 -07:00
parent 8e5e49984d
commit 563dc2a993

View file

@ -72,6 +72,8 @@ final class ArcanistConduitCallFuture
}
protected function didReceiveException($exception) {
if ($exception instanceof ConduitClientException) {
switch ($exception->getErrorCode()) {
case 'ERR-INVALID-SESSION':
if (!$this->getEngine()->getConduitToken()) {
@ -82,6 +84,7 @@ final class ArcanistConduitCallFuture
$this->raiseInvalidAuth();
break;
}
}
throw $exception;
}