diff --git a/app/services/stripe.js b/app/services/stripe.js index da86737..a0bb3b3 100644 --- a/app/services/stripe.js +++ b/app/services/stripe.js @@ -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); - }); }); }