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:
@@ -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}`)
|
||||
|
||||
Reference in New Issue
Block a user