fix(medusa): Send INSUFFICIENT_INVENTORY code with error (#5265)
This commit is contained in:
1 parent
a9703bd370
commit
ea8d9e30e7
1 file changed
+2
-1
@@ -1042,7 +1042,8 @@ class CartService extends TransactionBaseService {
|
|||||||
if (!hasInventory) {
|
if (!hasInventory) {
|
||||||
throw new MedusaError(
|
throw new MedusaError(
|
||||||
MedusaError.Types.NOT_ALLOWED,
|
MedusaError.Types.NOT_ALLOWED,
|
||||||
"Inventory doesn't cover the desired quantity"
|
"Inventory doesn't cover the desired quantity",
|
||||||
|
MedusaError.Codes.INSUFFICIENT_INVENTORY
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user