#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 8 years ago by
Owner: | changed from Dustin Machi to haysmark |
---|---|
Status: | new → assigned |
comment:2 Changed 8 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:4 Changed 8 years ago by
Milestone: | tbd → 1.8.4 |
---|
Note: See
TracTickets for help on using
tickets.
In [30636]: