Skip to content

Commit

Permalink
wrap error code in Ember.Error on reject
Browse files Browse the repository at this point in the history
  • Loading branch information
iezer committed Jul 23, 2015
1 parent bf138ff commit 5602930
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/services/stripe.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,10 @@ function createCardToken (card) {
debug('card.createToken handler - status %s, response:', status, response);

if (response.error) {
return Ember.run(null, reject, response);
return Ember.run(null, reject, new Ember.Error(response.error.code));
}

Ember.run(null, resolve, response);

});
});
}
Expand Down

0 comments on commit 5602930

Please sign in to comment.