Skip to content

Commit

Permalink
[ADDED] RPC Error Code to Logging
Browse files Browse the repository at this point in the history
  • Loading branch information
MPOS123 committed Feb 12, 2014
1 parent 8fd0af6 commit def6850
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion public/include/lib/jsonRPCClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public function __call($method, $params) {
$resultStatus = curl_getinfo($ch);
if ($resultStatus['http_code'] != '200') {
if ($resultStatus['http_code'] == '401') throw new Exception('RPC call did not return 200: Authentication failed');
throw new Exception('RPC call did not return 200: HTTP error: ' . $resultStatus['http_code'] . ' - JSON Response: ' . @$response['error']['message']);
throw new Exception('RPC call did not return 200: HTTP error: ' . $resultStatus['http_code'] . ' - JSON Response: [' . @$response['error']['code'] . '] ' . @$response['error']['message']);
}
if (curl_errno($ch)) throw new Exception('RPC call failed: ' . curl_error($ch));
curl_close($ch);
Expand Down

0 comments on commit def6850

Please sign in to comment.