In the following javascript, I would like to handle errors based on the http error code. You can handle all other types of HTTP errors, but not 407, when the server sends 407 status, jqXHR.status displays as "0" and not "407". Any idea why it doesn't show 407 status? Is there an alternative approach for handling 407 client-side errors.
function handleError(jqXHR) {
if (jqXHR.status === 500) {
} else if (jqXHR.status === 404) {
} else if (jqXHR.status === 407) {
}
}
Run codeHide result
source
share