Skip to content

feat(inactives): check for email bounce#18388

Merged
chenba merged 1 commit intomainfrom
fxa-11070-inactive-bounce-check
Feb 19, 2025
Merged

feat(inactives): check for email bounce#18388
chenba merged 1 commit intomainfrom
fxa-11070-inactive-bounce-check

Conversation

@chenba
Copy link
Copy Markdown
Contributor

@chenba chenba commented Feb 18, 2025

Because:

  • we want to delete an inactive account if the first email notification was hard bounced

This commit:

  • checks whether the first email hard bounced prior to sending the second email, and deletes the account if so

@chenba chenba requested a review from a team as a code owner February 18, 2025 13:40
const now = Date.now();

// If the very first email hard bounced, we'll delete the account without
// sending further emails.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏽

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: This might be helpul to be pulled into its own function for readiability.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would we need to wrap this block in a try/catch? ie if the account delete task fails?

Copy link
Copy Markdown
Contributor Author

@chenba chenba Feb 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is in response to a cloud task so the task would retry.

Because:
 - we want to delete an inactive account if the first email notification
   was hard bounced

This commit:
 - checks whether the first email hard bounced prior to sending the
   second email, and deletes the account if so
@chenba chenba force-pushed the fxa-11070-inactive-bounce-check branch from 5c61145 to 5f91300 Compare February 19, 2025 18:38
@chenba chenba merged commit 5456de9 into main Feb 19, 2025
@chenba chenba deleted the fxa-11070-inactive-bounce-check branch February 19, 2025 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants