Got nothing exception message in case of error from javascript


#1

hi
I am Azhar, I am using twitter API from JavaScript client. I make request for oauth token just for testing my code with this Url
"https://twitter.com/oauth/request_token" , but when I make request from JavaScript I got error , that’s fine,
I can see in fiddler 401 http status code, but in my JavaScript I got nothing , just got “statustext=error” and status=0.

I did not get http status code and exception message.

here is my code JavaScript code
var hanlderUrl = “https://twitter.com/oauth/request_token”;
$.ajax(
{
type: “GET”,
url: hanlderUrl ,
crossdomain:true ,
error: function (req, type, ex) {
var exception = ex;
}
});


#2

Keep in mind that use of the API through client-side Javascript is strongly discouraged.

You’re using an outdated path – review the documentation on this site for more information on the proper paths for OAuth 1.0A.