Opened 6 years ago

Closed 4 years ago

#17148 closed defect (fixed)

[patch][cla] RpcService error callback should always get an Error object

Reported by: freddefisk Owned by: dylan
Priority: low Milestone: 1.11
Component: RPC Version: 1.9.0
Keywords: Cc:
Blocked By: Blocking:

Description

If a RPC call fails with a non "200 OK" response status, for example a 404, the registered error callback is called with a string as argument. This is inconsistent with how it's called if the error happens on the RPC-protocol level, ie. the response object contains an "error" property.

This can be fixed by changing the line

deferredRequestHandler.errback(data.message);

to

deferredRequestHandler.errback(data);

in https://bugs.dojotoolkit.org/browser/dojo/dojo/trunk/rpc/RpcService.js?rev=30743&marks=92#L86

Change History (2)

comment:1 Changed 4 years ago by dylan

Milestone: tbd1.11
Owner: changed from Dustin Machi to dylan
Priority: undecidedlow
Status: newassigned

Created a pull request for this one at https://github.com/dojo/dojo/pull/115

Need to test it before landing.

comment:2 Changed 4 years ago by dylan

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.