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

feat(next): Clean up artifacts from checkout process on checkout failure #18316

Merged
merged 1 commit into from
Feb 7, 2025

Conversation

david1alvarez
Copy link
Contributor

Because

  • As the user processes through the checkout process for a subscription, we create business objects to represent their subscription and the stakeholders. If the subscription fails, the artifacts need to be cleaned up.

This pull request

  • Adds additional logic to the cart service wrapWithCartCatch method to clean up defunct artifacts.

Issue that this pull request solves

Closes: #FXA-10628

Checklist

Put an x in the boxes that apply

  • My commit is GPG signed.
  • If applicable, I have modified or added tests which pass locally.
  • I have added necessary documentation (if appropriate).
  • I have verified that my changes render correctly in RTL (if appropriate).

Screenshots (Optional)

Please attach the screenshots of the changes made in case of change in user interface.

Other information (Optional)

Any other information that is important to this pull request.

@david1alvarez david1alvarez force-pushed the FXA-10628 branch 2 times, most recently from 49fc9b7 to ba572a5 Compare February 6, 2025 21:53
}
} catch (e) {
// swallow the error to allow cancellation of the subscription
console.error(e);
Copy link
Member

Choose a reason for hiding this comment

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

This should probably be a sentry log -- console logs really don't go anywhere

Because:

* As the user processes through the checkout process for a subscription, we create business objects to represent their subscription and the stakeholders. If the subscription fails, the artifacts need to be cleaned up.

This commit:

* Adds additional logic to the cart service wrapWithCartCatch method to clean up defunct artifacts.

Closes #FXA-10628
@david1alvarez david1alvarez merged commit e3a19db into main Feb 7, 2025
4 of 7 checks passed
@david1alvarez david1alvarez deleted the FXA-10628 branch February 7, 2025 23:59
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