Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#16256 closed defect (fixed)

dojox.rpc.JsonRPC Doesn't Deserialize Errors Correctly

Reported by: haysmark Owned by: haysmark
Priority: undecided Milestone: 1.8.4
Component: RPC Version: 1.8.0
Keywords: Cc:
Blocked By: Blocking:

Description

This ticket has to do with the switch to dojo/request in 1.8.

In JsonRPC's deserialize function, there is a check to see if the obj passed in has the name 'Error' and if it does, it parses the response text. If the response text has an error property e.g. { "error": "This is an error" }, deserialize would throw a new Error object with the error property's value as the message.

In 1.7, this worked because an Error object (name="Error") would be passed into deserialize.

In 1.8, it doesn't work because a RequestError? object is passed in (name="RequestError?"). A generic "Unable to load ..." message is always returned.

Change History (6)

comment:1 Changed 6 years ago by haysmark

Owner: changed from Dustin Machi to haysmark
Status: newassigned

comment:2 Changed 6 years ago by haysmark

Resolution: fixed
Status: assignedclosed

In [30636]:

Workaround 1.7->1.8 API regression where the format of XHR errors changed unexpectedly. Fixes #16256.

comment:3 Changed 6 years ago by haysmark

In [30637]:

Backport xhr regression fix to 1.8. Refs #16256.

comment:4 Changed 6 years ago by bill

Milestone: tbd1.8.4

comment:5 Changed 6 years ago by haysmark

In [31078]:

Complete curious half-checkin. Refs #16256. Fixes #16947.

comment:6 Changed 6 years ago by haysmark

In [31079]:

Complete curious half-checkin. Refs #16256. Fixes #16947.

Note: See TracTickets for help on using tickets.