Stamplay / stamplay-js-sdk

:rocket: JavaScript SDK of Stamplay cloud platform
https://stamplay.com
MIT License
88 stars 18 forks source link

bug: Login issue with Chrome #35

Open jdbence opened 8 years ago

jdbence commented 8 years ago

In Chrome when incorrect creds are sent, the 401 response sometimes is caught by the catch method and sometimes by the error method. It works correctly in Edge and FireFox.

var data = {'email':'fake.email@gmail.com', 'password':'fake'};
Stamplay.User.login(data).then(function(res){ 
  console.log('login Success', res); 
}, function(err) { 
  console.log('login Error', err); 
}).catch(function(res){ 
  console.log('catch', res); 
});