From 4ac48f08be400b915e88ba25249a04a8a2747fd7 Mon Sep 17 00:00:00 2001 From: Max Kanat-Alexander Date: Fri, 26 Feb 2010 23:53:50 -0800 Subject: Bug 547852: Make the JSON-RPC interface return the correct error format to JSON-RPC 1.0 clients. r=dkl, a=mkanat --- Bugzilla/Error.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Bugzilla/Error.pm') diff --git a/Bugzilla/Error.pm b/Bugzilla/Error.pm index 8e3710129..98e7d1d2f 100644 --- a/Bugzilla/Error.pm +++ b/Bugzilla/Error.pm @@ -124,7 +124,9 @@ sub _throw_error { # higher than 999, but we do this to avoid conflicts with # the internal JSON::RPC error codes. $server->raise_error(code => 100000 + $code, - message => $message); + message => $message, + id => $server->{_bz_request_id}, + version => $server->version); # We die with no message. JSON::RPC checks raise_error before # it checks $@, so it returns the proper error. die; -- cgit v1.2.3-24-g4f1b