From fe0602df56d84de1aa0dc4b7f27e1dcca73be988 Mon Sep 17 00:00:00 2001 From: Isaac Ezer Date: Wed, 22 Jul 2015 10:34:50 -0700 Subject: [PATCH] wrap error code in Ember.Error on reject --- app/services/stripe.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/services/stripe.js b/app/services/stripe.js index da86737..2b3970b 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.code)); } Ember.run(null, resolve, response); - }); }); }