I'm getting an error when trying to call an REST service using ajax. I'm trying to track down the error. The xhr.message
is always coming in as undefined. Is there a better way to get the exact message as to why it is erroring?
$.ajax({
url: 'myurl.com/post/',
type: 'post',
data: query,
cache: false,
error: function (xhr, status, error) {
alert(JSON.stringify(xhr.message));
alert(JSON.stringify(status));
alert(JSON.stringify(error));
}
});