diff options
Diffstat (limited to 'lib/libbugzilla.js')
-rw-r--r-- | lib/libbugzilla.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libbugzilla.js b/lib/libbugzilla.js index ae4ea01..0eba70b 100644 --- a/lib/libbugzilla.js +++ b/lib/libbugzilla.js @@ -364,6 +364,9 @@ var makeJSONRPCCall = exports.makeJSONRPCCall = function makeJSONRPCCall(url, me onComplete: function(response) { if (response.status == 200) { debug("makeJSONRPCCall: in = " + response.text); + if ("error" in response.json) { + throw new Error("Error in JSON-RPC call:\n" + response.json.error); + } callback(response.json.result); } }, |