summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Bugzilla/Error.pm7
1 files changed, 5 insertions, 2 deletions
diff --git a/Bugzilla/Error.pm b/Bugzilla/Error.pm
index 98e7d1d2f..0c471125d 100644
--- a/Bugzilla/Error.pm
+++ b/Bugzilla/Error.pm
@@ -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);
}
}
}