diff options
author | Dylan William Hardison <dylan@hardison.net> | 2018-06-22 06:13:25 +0200 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2018-06-28 22:42:02 +0200 |
commit | 090046b9b54c27239c742b019e3296ed51828221 (patch) | |
tree | b0005313dcaf23497fe1c8cd5f31752f0027b00c | |
parent | 89a8228c445ed9082a977b4bf5bdf6a23bee0427 (diff) | |
download | bugzilla-090046b9b54c27239c742b019e3296ed51828221.tar.gz bugzilla-090046b9b54c27239c742b019e3296ed51828221.tar.xz |
use an explicit check for the _handle stuff
-rw-r--r-- | Bugzilla/Error.pm | 4 | ||||
-rw-r--r-- | Bugzilla/WebService/Server/JSONRPC.pm | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/Bugzilla/Error.pm b/Bugzilla/Error.pm index cf3688292..ad195f02f 100644 --- a/Bugzilla/Error.pm +++ b/Bugzilla/Error.pm @@ -124,9 +124,9 @@ sub _throw_error { message => $message, id => $server->{_bz_request_id}, version => $server->version); - # if _bz_request_id is set, we're inside the _handle() function + # if _bz_will_handle_error is set, we're inside the _handle() function # and we don't need to call $server->response. - unless ($server->{_bz_request_id}) { + unless ($server->{_bz_will_handle_error}) { $server->response($server->error_response_header); } } diff --git a/Bugzilla/WebService/Server/JSONRPC.pm b/Bugzilla/WebService/Server/JSONRPC.pm index 093167048..38c8da296 100644 --- a/Bugzilla/WebService/Server/JSONRPC.pm +++ b/Bugzilla/WebService/Server/JSONRPC.pm @@ -271,6 +271,7 @@ sub _handle { my $self = shift; my ($obj) = @_; $self->{_bz_request_id} = $obj->{id}; + local $self->{_bz_will_handle_error} = 1; my $result = $self->SUPER::_handle(@_); |