I am using jQuery's ajax method to submit an ajax request like this:
$.ajax({
type: "PUT",
url: someURL,
contentType: "application/json",
data: JSON.stringify(data),
dataType: "json"
})
How can I add error handlers for the http status codes 401 and 404?