arecibo doesn't handle XMLRPC errors correctly

RESOLVED FIXED

Status

()

bugzilla.mozilla.org
General
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: glob, Assigned: glob)

Tracking

Production
x86
Mac OS X

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
from bug 744691:

Bugzilla/Arecibo.pm is messing with the "die SOAP::Fault->faultcode($code)->faultstring($message);" function in Error.pm. Instead of
getting the proper XMLRPC envelope back with the code and message for 'undefined_class', I get a HTML version of the error generated from Arecibo.pm.

Can't handle MIME messsage with specified type (text/html)
Content-type: text/html


            <h1>Bugzilla has suffered an internal error</h1>
            <pre>-32602: A web service class was not defined.</pre>
            <hr>
            <pre></pre>
        <?xml version="1.0" encoding="UTF-8"?><methodResponse><fault><value><struct at getBug_xmlrpc.pl line 59

This stems from the code in Arecibo.pm which installs a custom die handler that intercepts the die SOAP::Fault. We should maybe check for Bugzilla->error_mode == ERROR_MODE_DIE_SOAP_FAULT (and _JSON_RPC too probably) and do something different
for those.
(Assignee)

Updated

6 years ago
Assignee: nobody → glob
(Assignee)

Comment 1

6 years ago
Created attachment 625568 [details] [diff] [review]
patch v1
Attachment #625568 - Flags: review?(dkl)
Comment on attachment 625568 [details] [diff] [review]
patch v1

Review of attachment 625568 [details] [diff] [review]:
-----------------------------------------------------------------

Works good. r=dkl

::: Bugzilla/Arecibo.pm
@@ +272,4 @@
>          my $uid = arecibo_generate_id();
>          my $notified = arecibo_handle_error('error', $message, $uid);
> +
> +        # if we aren't dieing from a web page, let perl deal with it.  this

nit: s/dieing/dying/
Attachment #625568 - Flags: review?(dkl) → review+
(Assignee)

Comment 3

6 years ago
Committing to: bzr+ssh://bjones%40mozilla.com@bzr.mozilla.org/bmo/4.0/
modified Bugzilla/Arecibo.pm
modified Bugzilla/WebService/Server.pm
Committed revision 8188.

Committing to: bzr+ssh://bjones%40mozilla.com@bzr.mozilla.org/bmo/4.2
modified Bugzilla/Arecibo.pm
modified Bugzilla/WebService/Server.pm
Committed revision 8168.
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.