Commit 11e17bef authored by Max Kanat-Alexander's avatar Max Kanat-Alexander

Bug 554714: Make JSON-RPC throw errors properly even if they are thrown

before method evaluation (like during checking of Bugzilla_login and Bugzilla_password) r=dkl, a=mkanat
parent c2369536
......@@ -127,9 +127,12 @@ sub _throw_error {
message => $message,
id => $server->{_bz_request_id},
version => $server->version);
# We die with no message. JSON::RPC checks raise_error before
# Most JSON-RPC Throw*Error calls happen within an eval inside
# of JSON::RPC. So, in that circumstance, instead of exiting,
# we die with no message. JSON::RPC checks raise_error before
# it checks $@, so it returns the proper error.
die;
die if _in_eval();
$server->response($server->error_response_header);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment