mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
catch newsletter email change error if user already exists on mailing list
This commit is contained in:
parent
60b3e6777f
commit
425017930a
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