mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 01:51:40 -05:00
use correct code for Mailchimp "already subscribed" state
This commit is contained in:
parent
afc26c0584
commit
25009baba5
1 changed files with 2 additions and 2 deletions
|
@ -47,7 +47,7 @@ if (settings) {
|
|||
return {result: 'subscribed', ...subscribe};
|
||||
} catch (error) {
|
||||
// if the email is already in the Mailchimp list, no need to throw an error
|
||||
if (error.message === "214") {
|
||||
if (error.code === 214) {
|
||||
return {result: 'already-subscribed'};
|
||||
}
|
||||
throw new Error("subscription-failed", error.message);
|
||||
|
|
Loading…
Add table
Reference in a new issue