mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 10:01: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) {
|
function subscribeUserOnProfileCompletion (user) {
|
||||||
if (!!Telescope.settings.get('autoSubscribe') && !!Users.getEmail(user)) {
|
if (!!Telescope.settings.get('autoSubscribe') && !!Users.getEmail(user)) {
|
||||||
MailChimpList.add(user, false, function (error, result) {
|
try {
|
||||||
console.log(error);
|
MailChimpList.add(user, false, function (error, result) {
|
||||||
console.log(result);
|
console.log(error);
|
||||||
});
|
console.log(result);
|
||||||
|
});
|
||||||
|
} catch (error) {
|
||||||
|
console.log("// MailChimp Error:")
|
||||||
|
console.log(error)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return user;
|
return user;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue