Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: convert Bounce module to use neverthrow #1591

Merged
merged 6 commits into from
Apr 9, 2021

Conversation

mantariksh
Copy link
Contributor

@mantariksh mantariksh commented Apr 8, 2021

Updates the Bounce module to use neverthrow.

A note on PR scope: there is a lot of refactoring that can be done in the Bounce module, but I don't think it should be a priority right now. The module is complex and was based on a long process of designing and refining, and refactoring it will not only take a long time but risks disrupting a service which has been automated for nearly a year. Hence I think a deeper refactor is out of scope of this PR, unless any part of it is genuinely un-readable.

Closes #193

Manual tests

  • Create an email mode form. Add a valid collaborator with a registered contact number, and add a non-existent email as one of the email recipients. Submit the form. The form should NOT be deactivated, and the valid email recipient should not receive any emails/SMSes. Check the document in the Bounces collection corresponding to the form ID. The bounces array should contain the correct hasBounced key for each email addres.
  • Remove all valid email recipients and leave only non-existent emails. Submit the form. The form should be deactivated, and the form admin + collaborators should receive ONE email and TWO smses each, informing them of the bounce and form deactivation.

Copy link
Contributor

@karrui karrui left a comment

Choose a reason for hiding this comment

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

lgtm, thanks for the effort

src/app/modules/bounce/__tests__/bounce.controller.spec.ts Outdated Show resolved Hide resolved
@mantariksh mantariksh merged commit d3ee8c0 into develop Apr 9, 2021
@karrui karrui mentioned this pull request Apr 13, 2021
@mantariksh mantariksh deleted the ref/bounce-neverthrow branch April 13, 2021 06:35
@wanlingt wanlingt mentioned this pull request Jul 6, 2022
3 tasks
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.

Convert Bounce, Webhook services to neverthrow
2 participants