Where can I find a full list of (common) things that go wrong with an $.ajax() request, and what error types/codes they result in? On https://api.jquery.com/jQuery.ajax/#jqXHR I can see all the possible outcomes, but not what can cause such an outcome. For example, I wonder
- It says about .error()
Possible values for the second argument (besides null) are "timeout", "error", "abort", and "parsererror".but what events would result in the second argument being null? - What does it mean if the jqXHR object has status is 0 (which I've seen happens sometimes, but I have no clue when or how or why)?
- Reversely, if I were to think "what would happen to incoming requests if I reboot my server now" or "what would happen if the user's network connection was flakey", how can I know which error type / jqXHR status / responseText message etc. that would cause for the user?
Possibly this question has the very simple answer that "null textStatus", "0 jqXHR status" and "client side network connection issue" are all the same thing (as in you either have all three or none), or something close to that, but I can't find this documented anywhere.
There is called "complete" callback, check what status it returns. what i know is the server should return these status as such, but what you have is an exception. Adding timeout might help as well.