Opened 8 years ago
Closed 8 years ago
#16023 closed defect (fixed)
xhr RequestError breaks back-compat
Reported by: | Adam Peller | Owned by: | Bryan Forbes |
---|---|---|---|
Priority: | undecided | Milestone: | 1.8.1 |
Component: | IO | Version: | 1.8.0 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description (last modified by )
Prior to Dojo 1.8, xhr would throw an Error on xhr failure as so:
var err = new Error("Unable to load " + dfd.ioArgs.url \ + " status:" + xhr.status); err.status = xhr.status; err.responseText = xhr.responseText; err.xhr = xhr; dfd.errback(err);
In 1.8, a RequestError? object is thrown with only message and response. The response object then has the status information.
It may not be reasonable to expect full back-compat (e.g. the exception type change, and perhaps passing back the xhr object would be a problem) but it's important to keep the status code in the same place, since that's often critical to how errors are handled, and prior to 1.8, that was the only way to reliably get that information.
Change History (4)
comment:1 Changed 8 years ago by
Description: | modified (diff) |
---|---|
Milestone: | tbd → 1.8.1 |
Status: | new → assigned |
comment:2 Changed 8 years ago by
comment:4 Changed 8 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
I changed the back-compat layer for XHR to add those properties to the error.
Note: See
TracTickets for help on using
tickets.
In [29708]: