fix: propagate Shopify 404 through upload route so client retry triggers correctly

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-24 20:40:50 +02:00
parent 5e1b864ce7
commit 03770d1a76
2 changed files with 8 additions and 1 deletions
+6
View File
@@ -161,6 +161,12 @@ export async function uploadProductImage(
continue
}
if (res.status === 404) {
const err = new Error(`Shopify upload error: 404 — product not found`) as Error & { status: number }
err.status = 404
throw err
}
if (!res.ok) {
const body = await res.text()
throw new Error(`Shopify upload error: ${res.status}${body}`)