From 885915916ac3380ccc20e340fcb153ab47957148 Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Wed, 21 Oct 2015 11:27:13 +0100 Subject: [PATCH] check if user exists on recurly callback --- .../app/coffee/Features/Subscription/SubscriptionHandler.coffee | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/web/app/coffee/Features/Subscription/SubscriptionHandler.coffee b/services/web/app/coffee/Features/Subscription/SubscriptionHandler.coffee index cdb07755f4..7fa43f4270 100644 --- a/services/web/app/coffee/Features/Subscription/SubscriptionHandler.coffee +++ b/services/web/app/coffee/Features/Subscription/SubscriptionHandler.coffee @@ -70,6 +70,8 @@ module.exports = return callback(error) if error? User.findById recurlySubscription.account.account_code, (error, user) -> return callback(error) if error? + if !user? + return callback("no user found") SubscriptionUpdater.syncSubscription recurlySubscription, user?._id, callback