From def685082b21aa55a71db34ac6b07c29c25a8df9 Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Wed, 12 Feb 2014 15:44:00 +0100 Subject: [PATCH] [ADDED] RPC Error Code to Logging --- public/include/lib/jsonRPCClient.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/include/lib/jsonRPCClient.php b/public/include/lib/jsonRPCClient.php index 5c68662d..ba09ba63 100644 --- a/public/include/lib/jsonRPCClient.php +++ b/public/include/lib/jsonRPCClient.php @@ -114,7 +114,7 @@ class jsonRPCClient { $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);