Skip to content

fix(laravel): correct cart emptiness check in ProductController#1374

Draft
sentry[bot] wants to merge 1 commit intomasterfrom
seer/fix/laravel-cart-empty-check
Draft

fix(laravel): correct cart emptiness check in ProductController#1374
sentry[bot] wants to merge 1 commit intomasterfrom
seer/fix/laravel-cart-empty-check

Conversation

@sentry
Copy link
Contributor

@sentry sentry bot commented Mar 21, 2026

Fixes FRONTEND-REACT-6BV. The issue was that: Backend's checkout method throws an exception due to an undefined variable check during inventory validation, resulting in a 500 error and frontend explicitly throwing on undefined response status.

  • Moved the empty($quantities) check to occur after the $quantities array has been populated from $cart['quantities'].
  • Ensures that the cart emptiness validation accurately reflects the contents of the processed quantities.
  • Prevents an incorrect "Invalid checkout request: cart is empty" exception when the cart actually contains items.

This fix was generated by Seer in Sentry, triggered by Isaac Wang. 👁️ Run ID: 11848668

Not quite right? Click here to continue debugging with Seer.

@vercel
Copy link
Contributor

vercel bot commented Mar 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
empower Ignored Ignored Preview Mar 21, 2026 7:18pm

Request Review

@codecov
Copy link

codecov bot commented Mar 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 22.01%. Comparing base (6aab80f) to head (4f15831).
⚠️ Report is 2 commits behind head on master.
✅ All tests successful. No failed tests found.

❌ Your project check has failed because the head coverage (22.01%) is below the target coverage (35.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1374      +/-   ##
==========================================
- Coverage   22.02%   22.01%   -0.02%     
==========================================
  Files          42       42              
  Lines        1362     1363       +1     
  Branches      176      176              
==========================================
  Hits          300      300              
- Misses       1035     1037       +2     
+ Partials       27       26       -1     
Flag Coverage Δ
api 5.82% <ø> (-0.02%) ⬇️
frontend 32.37% <ø> (ø)
Components Coverage Δ
checkout_module 5.82% <ø> (-0.02%) ⬇️
product_component 26.03% <ø> (ø)
see 2 files with indirect coverage changes

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.

0 participants