Answer the question
In order to leave comments, you need to log in
After successful ajax request trigger .fail?
Good afternoon, there is a put request to the server of this type:
const params = {
url,
method: 'PUT',
contentType: 'application/json'
};
return $.ajax(params)
.done(() => {
})
.fail((error) => {
});
}
Answer the question
In order to leave comments, you need to log in
fail must take 3 arguments
xhr, status, error. You can add them to the options and what comes in them.
Maybe the text of the error will help.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question