#2724: JSON-RPC not forwarding exceptions/errors causing browser to time-out on
calls
-----------------------------------------+--------------------
Reporter: amain | Owner:
Type: bug | Status: new
Priority: major | Milestone: 1.3.x
Component: Web-UI | Version: 1.3.11
Keywords: exception, error, rpc, json |
-----------------------------------------+--------------------
ui/web/json_api.py:
{{{
def _on_rpc_request_failed(self, reason, response, request):
"""
Handles any failures that occurred while making an rpc call.
"""
request.setResponseCode(http.INTERNAL_SERVER_ERROR)
}}}
Above code will never send back a JSON-RPC response to the browser.
Causing the browser to time-out. This can easily be reproduced by raising
an DelugeError exception in one of the Deluge daemon @export RPC methods.
As a result exceptions can't be used to inform browser on RPC failures.
Note that there is also no other mechanism in Deluge to create JSON-RPC
error responses. Making it hard to handle errors generically in the
browser.
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/2724>
Deluge <http://deluge-torrent.org/>
Deluge Project
--
You received this message because you are subscribed to the Google Groups
"Deluge Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/deluge-dev.
For more options, visit https://groups.google.com/d/optout.