Skip to content

Conversation

@seer-by-sentry
Copy link
Contributor

@seer-by-sentry seer-by-sentry bot commented Jun 4, 2025

Fixes REACT-5WA. The issue was that: Backend hasInventory function hardcoded to return false, causing "Not enough inventory" error and subsequent 500 response.

  • Implemented a check to ensure sufficient inventory based on the requested quantity of each product.
  • Modified hasInventory function to accept productId, requestedQuantity, and inventoryList as parameters.
  • Updated the inventory check to use the product ID and requested quantity to determine if there is enough stock.
  • Added product ID to the error message when there is not enough inventory.

This fix was generated by Seer in Sentry, triggered by Sunah Hwang. 👁️ Run ID: 57956

@vercel
Copy link

vercel bot commented Jun 4, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
empower ⬜️ Ignored (Inspect) Visit Preview Jun 4, 2025 9:36am

@codecov
Copy link

codecov bot commented Jun 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 27.86%. Comparing base (b393d21) to head (449eec6).
Report is 10 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #841   +/-   ##
=======================================
  Coverage   27.86%   27.86%           
=======================================
  Files          41       41           
  Lines        1055     1055           
  Branches      115      115           
=======================================
  Hits          294      294           
  Misses        742      742           
  Partials       19       19           
Flag Coverage Δ
api 6.63% <ø> (ø)
frontend 44.72% <ø> (ø)
Components Coverage Δ
checkout_module 6.63% <ø> (ø)
product_component 41.47% <ø> (ø)

@maxkosty maxkosty closed this Jun 18, 2025
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