fix(payments-next): CartNotCreatedError: Cart not created: Cannot add or update a child row#20655
Merged
elizabeth-ilina merged 1 commit intoMay 28, 2026
Conversation
c7ae389 to
3c1b0e6
Compare
bcolsson
approved these changes
May 27, 2026
Contributor
StaberindeZA
left a comment
There was a problem hiding this comment.
A few questions/suggestions and just the 1 issue. Looks good otherwise.
Contributor
There was a problem hiding this comment.
suggestion: create a generic error page, similar to [cartId]/error/page.tsx, instead of one specifically for one error.
This is a non-blocking optional suggestion, since it can be abstracted at a future time when more error pages are required.
6a59a49 to
c1bd373
Compare
… or update a child row Because: * If a user deletes their account and then navigates to the /new page from a tab where they were signed in, it throws a CartNotCreatedError and shows the 'something went wrong' page, since it attempts to create a cart row with a uid that no longer exists in the accounts table. This commit: * Adds a SetupCartAccountNotFoundError, thrown from CartService.setupCart when the session uid does not resolve to an existing account. * /new catches this error and redirects to a new /account-not-found page, where the user can sign out and continue with a different account. Closes #[PAY-3707](https://mozilla-hub.atlassian.net/browse/PAY-3707)
c1bd373 to
3cd7e25
Compare
StaberindeZA
approved these changes
May 28, 2026
Contributor
StaberindeZA
left a comment
There was a problem hiding this comment.
LGTM! Thank you for making the changes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Because
This pull request
Issue that this pull request solves
Closes #PAY-3707
Checklist
Put an
xin the boxes that applyHow to review (Optional)
STRs:
Screen record from Stage:
Screen.Recording.2026-05-27.at.3.40.58.PM.mov
Fix (local):
Screen.Recording.2026-05-28.at.1.56.12.PM.mov
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.