summaryrefslogtreecommitdiffstats
path: root/Bugzilla/WebService
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/WebService')
-rw-r--r--Bugzilla/WebService/Server/JSONRPC.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/Bugzilla/WebService/Server/JSONRPC.pm b/Bugzilla/WebService/Server/JSONRPC.pm
index 3fa0b65a9..a75bba836 100644
--- a/Bugzilla/WebService/Server/JSONRPC.pm
+++ b/Bugzilla/WebService/Server/JSONRPC.pm
@@ -273,6 +273,9 @@ sub _handle {
my $result = $self->SUPER::_handle(@_);
+ # Reset in_eval to so we get normal exceptions from here
+ Bugzilla->request_cache->{in_eval} = 0;
+
# Set the ETag if not already set in the webservice methods.
my $etag = $self->bz_etag;
if (!$etag && ref $result) {
@@ -425,6 +428,9 @@ sub _argument_type_check {
$params = [$params];
}
+ # Let Bugzilla::Error know we are inside an eval() after this point
+ Bugzilla->request_cache->{in_eval} = 1;
+
return $params;
}