Reputation: 4530
I cannot find this in the documentation. I also did a run through the jquery source and can't find any more info.
By using jquery.ajax, when can I expect the fail callback to be run?
Apart of the following:
server is down and does not respond
// EDIT: added after comments, a lot of thanks to @charlietfl :
http error code equal to or greater then 400
what are the other cases when jquery will run the fail callback?
Upvotes: 4
Views: 139
Reputation: 1303
When the response status returned is 4xx or 5xx, which indicates a client-side or server-side error respectively. Here's the entire list of such status codes.
Upvotes: 2