0

I'm having trouble finding documentation on the jQuery ajax error. I'd like to create a function that is able to get the name of the web service that was called in order to report the error.

Is there a way in the error function to get the name of the function called?

   error: function() {
       //not sure what is available here
   }

I'd appreciate any documentation on what's available in the error function.

Alex
  • 1,576
  • 2
  • 15
  • 28

1 Answers1

1

Have a look at this question: jQuery Ajax error handling, show custom exception messages

The error function is :

error:function (xhr, ajaxOptions, thrownError){
  console.dir(xhr);
  console.dir(thrownError);
}

Where xhr is the XMLHttpRequest. You can use FireBug's console.dir to get its attributes.

Community
  • 1
  • 1
jonjbar
  • 3,896
  • 1
  • 25
  • 46