-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
Occasionally the server returns a message with no emails included. This is a separate issue, however the parseInactiveRecipients
function incorrectly returns a '.' instead of an empty array in this case. When an email that isn't valid is attempted to be sent the postmark server sometimes returns:
{
...
code: 406,
message: "You tried to send to recipient(s) that have been marked as inactive. Found inactive addresses: . Inactive recipients are ones that have generated a hard bounce, a spam complaint, or a manual suppression."
...
}
passing the message through parseInactiveRecipients
results incorrectly in: [ '.' ]
. When the expected result should be []
.
Minimal Replication:
> const { Errors: postmarkErrors } = require('postmark')
> postmarkErrors.InactiveRecipientsError.parseInactiveRecipients('You tried to send to recipient(s) that have been marked as inactive. Found inactive addresses: . Inactive recipients are ones that have generated a hard bounce, a spam complaint, or a manual suppression.')
< [ '.' ]
Metadata
Metadata
Assignees
Labels
No labels