Errors, when managed properly by the server, will be returned to your client with a specific HTTP status code different from 2xx (see RFC 2616 section 10).
It's advised to catch globally your errors from your $.ajaxSetup() as demonstrated in the example below. Therefore all errors coming from your ...