mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-25 08:12:40 +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:
parent
8e5e49984d
commit
563dc2a993
1 changed files with 12 additions and 9 deletions
|
@ -72,6 +72,8 @@ final class ArcanistConduitCallFuture
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function didReceiveException($exception) {
|
protected function didReceiveException($exception) {
|
||||||
|
|
||||||
|
if ($exception instanceof ConduitClientException) {
|
||||||
switch ($exception->getErrorCode()) {
|
switch ($exception->getErrorCode()) {
|
||||||
case 'ERR-INVALID-SESSION':
|
case 'ERR-INVALID-SESSION':
|
||||||
if (!$this->getEngine()->getConduitToken()) {
|
if (!$this->getEngine()->getConduitToken()) {
|
||||||
|
@ -82,6 +84,7 @@ final class ArcanistConduitCallFuture
|
||||||
$this->raiseInvalidAuth();
|
$this->raiseInvalidAuth();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
throw $exception;
|
throw $exception;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue