Closed Bug 486073 Opened 15 years ago Closed 14 years ago

JSON webservice does not display errors properly under mod_perl

Categories

(Bugzilla :: WebService, defect)

defect
Not set
major

Tracking

()

RESOLVED FIXED
Bugzilla 3.6

People

(Reporter: mkanat, Assigned: mkanat)

Details

Attachments

(1 file)

In bug 432907 comment 18, dkl mentions that error messages are not properly sent under mod_perl when using the JSON WebServices interface.
Version: 3.3.3 → 3.5
Flags: blocking3.6+
Attached patch v1Splinter Review
Okay, wow, this was a tough one, but I figured it out! :-) The problem under mod_perl was that we were returning the error message twice, because "exit" was being trapped by the JSON-RPC Server eval under mod_perl (under mod_perl, "exit" is actually an exception).

I changed the architecture we're using to send errors to a simpler, more standard way of using JSON::RPC, which is to simply call raise_error and then just die, and let JSON::RPC return the error message itself in its own code.
Assignee: webservice → mkanat
Status: NEW → ASSIGNED
Attachment #427685 - Flags: review?(dkl)
Comment on attachment 427685 [details] [diff] [review]
v1

Looks good and works for me. r=dkl
Attachment #427685 - Flags: review?(dkl) → review+
Flags: approval3.6+
Flags: approval+
  Thanks for the review, dkl!

Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/trunk/                       
modified Bugzilla/Error.pm
Committed revision 7022.

Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/3.6/                         
modified Bugzilla/Error.pm
Committed revision 6996.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: