Opened 10 years ago

Closed 9 years ago

Last modified 6 years ago

#2724 closed bug (Fixed)

JSON-RPC not forwarding exceptions/errors causing browser to time-out on calls

Reported by: amain Owned by:
Priority: major Milestone: 2.0.0
Component: Web UI Version: 1.3.11
Keywords: exception, error, rpc, json Cc:

Description

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.

Change History (4)

comment:1 by Calum, 9 years ago

What would you suggest as a solution?

comment:2 by Bro, 9 years ago

Resolution: Fixed
Status: newclosed

comment:3 by Calum, 9 years ago

Milestone: 1.3.x2.0

comment:4 by Calum, 6 years ago

Milestone: 2.02.0.0

Milestone renamed

Note: See TracTickets for help on using tickets.