mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge pull request #861 from sharelatex/ho-mailchimp-change-email
catch newsletter email change error if user already exists on mailing list
This commit is contained in:
commit
8b64f46807
1 changed files with 4 additions and 0 deletions
|
@ -47,6 +47,10 @@ module.exports =
|
|||
logger.log {oldEmail, newEmail},
|
||||
"unable to change email in newsletter, user has previously unsubscribed or new email already exist on list"
|
||||
return callback(err)
|
||||
else if err? and err.message.indexOf("is already a list member") != -1
|
||||
logger.log {oldEmail, newEmail},
|
||||
"unable to change email in newsletter, new email is already on mailing list"
|
||||
return callback()
|
||||
else if err?
|
||||
logger.err {err, oldEmail, newEmail}, "error changing email in newsletter"
|
||||
return callback(err)
|
||||
|
|
Loading…
Reference in a new issue