@porulle/adapter-shopify 0.73.2 → 0.73.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/src/index.ts +3 -1
package/dist/index.js
CHANGED
|
@@ -288,7 +288,9 @@ export function shopifyConnector(options) {
|
|
|
288
288
|
if (!created.ok)
|
|
289
289
|
return created;
|
|
290
290
|
const { order, userErrors } = created.value.orderCreate;
|
|
291
|
-
|
|
291
|
+
// Live Shopify (2026-10, measured) refuses stock as `INVALID` on `["order","lineItems"]` with "Line items
|
|
292
|
+
// Unable to reserve inventory", not the documented `INVENTORY_CLAIM_FAILED`; both are read as out of stock.
|
|
293
|
+
if (userErrors.some((error) => error.code === "INVENTORY_CLAIM_FAILED" || /unable to reserve inventory/i.test(error.message))) {
|
|
292
294
|
return Err({ code: CHANNEL_OUT_OF_STOCK, message: `The store does not have the stock: ${userErrors.map((error) => error.message).join("; ")}.`, retriable: false });
|
|
293
295
|
}
|
|
294
296
|
if (userErrors.length > 0 || !order) {
|