I have a function like this:
function checkAvailability() {
try {
$.ajax({
type: "GET",
url: `https://www.example.com/?....`,
success: function (response) {
// continue with the response even if there is a 403 error
},
});
} catch (error) {
console.log(error);
}
}
And im expecting a 403 error and want to continue with the response of this request (not with the errors from js). JS stops working and i can't continue working with the response.
And chance to ignore a 403 erro in ajax calls ?