mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 01:51:40 -05:00
try/catch for mailchimp
This commit is contained in:
parent
a74744d2c7
commit
8b35d59323
1 changed files with 9 additions and 4 deletions
|
@ -4,10 +4,15 @@ import Users from 'meteor/nova:users';
|
|||
|
||||
function subscribeUserOnProfileCompletion (user) {
|
||||
if (!!Telescope.settings.get('autoSubscribe') && !!Users.getEmail(user)) {
|
||||
MailChimpList.add(user, false, function (error, result) {
|
||||
console.log(error);
|
||||
console.log(result);
|
||||
});
|
||||
try {
|
||||
MailChimpList.add(user, false, function (error, result) {
|
||||
console.log(error);
|
||||
console.log(result);
|
||||
});
|
||||
} catch (error) {
|
||||
console.log("// MailChimp Error:")
|
||||
console.log(error)
|
||||
}
|
||||
}
|
||||
return user;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue