Ticket #11850 (closed bug: worksforme)
jQuery.ajax does not perform response with script Mime Type if status is 403
|Reported by:||Marc-André Lafortune <jquery@…>||Owned by:|
The documentation states about the processing of dataType:
This is incorrect in case of a status code that is an error, say 403.
Personally, I vote for (b).
Typical use case: There's a form. I click on "save". This fires some Ajax request. The server validates the form and there is something wrong with the data or the user is not authorized. The record is not saved, so the request was not successful. Server can return an error code, with some JS to display an error message, highlight the wrong field, etc... The 'success' callback of the ajax request will not be fired, since the request was not fulfilled even though it got to the server, it was not accepted by it.
I didn't check, but I assume the same argument can be made for parsing JSON, etc...
- Keywords needsdocs added
- Status changed from new to closed
- Resolution set to worksforme
- Keywords 1.9-discuss added; needsdocs removed
- Component changed from unfiled to ajax