Opened 7 years ago

Closed 7 years ago

#16345 closed defect (invalid)

dojo/request/notify does not allow access to reponse body in case of an error

Reported by: Simon Speich Owned by: Bryan Forbes
Priority: undecided Milestone: tbd
Component: IO Version: 1.8.1
Keywords: Cc:
Blocked By: Blocking:

Description

When listening to notify('done') or notify('error') you can't get access to the response body in case of an error. But it is pretty usual to add custom error messages to a 505 or 404 response body.

I think both events should return the same object as in case of 200 OK, where you can access the body either with response.text, or response.xhr.responseText.

Change History (2)

comment:1 Changed 7 years ago by Simon Speich

Sorry for the noise. didn't realize that the returned Error has a response property, which allows me to access the body and the xhr object.

You can close this ticket.

comment:2 Changed 7 years ago by bill

Resolution: invalid
Status: newclosed

OK, closing it. The documentation issue is listed in #16666 too.

Note: See TracTickets for help on using tickets.