From 5602930fbc3951bd281777ba64d2511edc9ea5af 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..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); - }); }); }