Просмотр исходного кода

Add error-handling to attempt to get user subscription

Shane Kilkelly 9 лет назад
Родитель
Сommit
c121653dc4
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      services/web/app/coffee/Features/Subscription/SubscriptionController.coffee

+ 1 - 0
services/web/app/coffee/Features/Subscription/SubscriptionController.coffee

@@ -135,6 +135,7 @@ module.exports = SubscriptionController =
 				RecurlyWrapper.getSubscription subscription.recurlySubscription_id,
 				RecurlyWrapper.getSubscription subscription.recurlySubscription_id,
 					includeAccount: true,
 					includeAccount: true,
 					(err, usersSubscription)->
 					(err, usersSubscription)->
+						return next(err) if err?
 						account = usersSubscription.account
 						account = usersSubscription.account
 						hostedLoginToken = account.hosted_login_token
 						hostedLoginToken = account.hosted_login_token
 						if !hostedLoginToken
 						if !hostedLoginToken