0

I am using .error() as the callback for .post(). Like :

 $.post("url", function(data){})
 .error(function(){
          alert("some error");
 });

I want to see the detailed error message if some error will occure. How can i see that ?

1
  • It is better to use fail() instead of deprecated error(). Commented Aug 29, 2012 at 16:19

1 Answer 1

3
 $.post("url", function(data){})
 .error(function(event, jqXHR, ajaxSettings, thrownError){
     console.log(event, jqXHR, ajaxSettings, thrownError);
 });
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.