Skip to content

fix(cart): recover from stale menu items at checkout - #65

Merged
prit-007 merged 1 commit into
mainfrom
fix/stale-cart-items
Oct 10, 2026
Merged

prit-007 merged 1 commit into
mainfrom
fix/stale-cart-items

Conversation

@prit-007

Copy link
Copy Markdown
Collaborator

A localStorage cart can reference menu items that no longer exist (e.g. after a DB reset/migrate). On the 'Menu item not found' 400, drop just that line + show a friendly message so retry succeeds. Pure helper + tests. Lint 0 · 100 tests · build OK.

When POST /orders returns 'Menu item not found: <uuid>' (the browser cart still
holds an item deleted from the current DB), CartContext now removes just that
line and surfaces a clear message instead of a hard checkout failure. Pure
staleItemId() helper + test (101 total). Lint 0, 100 tests, build OK.
@prit-007
prit-007 merged commit cfc6dec into main Oct 10, 2026
3 checks passed
@prit-007
prit-007 deleted the fix/stale-cart-items branch October 10, 2026 07:23
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.

1 participant