Got nothing exception message in case of error from javascript


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
"" , 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 = “”;
type: “GET”,
url: hanlderUrl ,
crossdomain:true ,
error: function (req, type, ex) {
var exception = ex;


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.