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

When raising a Conduit client exception, show the called method in the error message

Summary: Ref T13581. This message can be slightly more helpful in some cases by showing which method call failed.

Test Plan: Ran `arc branches` under the error condition in D21462, got a more useful error.

Maniphest Tasks: T13581

Differential Revision: https://secure.phabricator.com/D21463
This commit is contained in:
epriestley 2020-09-15 17:19:26 -07:00
parent 7112ee3d59
commit de209ec064

View file

@ -62,9 +62,14 @@ final class ConduitFuture extends FutureProxy {
}
if ($data['error_code']) {
$message = pht(
'<%s> %s',
$this->conduitMethod,
$data['error_info']);
throw new ConduitClientException(
$data['error_code'],
$data['error_info']);
$message);
}
$result = $data['result'];