Skip to content

Commit f7d464a

Browse files
committed
fix: handle error gracefully
1 parent bdd41ae commit f7d464a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

web-assets/auth0/dev-tenant/rules/onboardingChecklist.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@ function (user, context, callback) {
1414
if (!handle && provider === "auth0") {
1515
handle = _.get(user, "nickname", null);
1616
}
17-
18-
const loginCount = _.get(context, "stats.loginsCount");
19-
console.log('rule:onboarding-checklist: loginCount', loginCount);
20-
17+
2118
const getToken = function(callback) {
2219
if (global.M2MToken) {
2320
console.log('rule:onboarding-checklist:M2M token is available');
@@ -116,6 +113,9 @@ function (user, context, callback) {
116113
}
117114
console.log('rule:onboarding-checklist:Setting redirectUrl', redirectUrl);
118115
return callback(null, user, context);
116+
}).catch(requestError => {
117+
console.log("rule:onboarding-checklist:Failed fetching onboarding_checklist with error", requestError);
118+
return callback(null, user, context);
119119
})
120120

121121
} catch (e) {

0 commit comments

Comments
 (0)