Changeset View
Changeset View
Standalone View
Standalone View
src/conduit/ConduitFuture.php
Show First 20 Lines • Show All 56 Lines • ▼ Show 20 Lines | try { | ||||
throw new PhutilProxyException( | throw new PhutilProxyException( | ||||
pht( | pht( | ||||
'Host returned HTTP/200, but invalid JSON data in response to '. | 'Host returned HTTP/200, but invalid JSON data in response to '. | ||||
'a Conduit method call.'), | 'a Conduit method call.'), | ||||
$ex); | $ex); | ||||
} | } | ||||
if ($data['error_code']) { | if ($data['error_code']) { | ||||
$message = pht( | |||||
'<%s> %s', | |||||
$this->conduitMethod, | |||||
$data['error_info']); | |||||
throw new ConduitClientException( | throw new ConduitClientException( | ||||
$data['error_code'], | $data['error_code'], | ||||
$data['error_info']); | $message); | ||||
} | } | ||||
$result = $data['result']; | $result = $data['result']; | ||||
$result = $this->client->didReceiveResponse( | $result = $this->client->didReceiveResponse( | ||||
$this->conduitMethod, | $this->conduitMethod, | ||||
$result); | $result); | ||||
return $result; | return $result; | ||||
} | } | ||||
} | } |