sanchez
sanchez

Reputation: 4530

When exactly does jquery.ajax run the fail callback?

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:

what are the other cases when jquery will run the fail callback?

Upvotes: 4

Views: 139

Answers (1)

Guybrush Threepwood
Guybrush Threepwood

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

Related Questions