The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Update checkout-cache.ts
Kiran K28105fb795e7
diff --git a/apps/web/lib/integrations/shopify/checkout-cache.ts b/apps/web/lib/integrations/shopify/checkout-cache.tsindex c8ef350f55..3fd53217eb 100644--- a/apps/web/lib/integrations/shopify/checkout-cache.ts+++ b/apps/web/lib/integrations/shopify/checkout-cache.ts@@ -82,16 +82,21 @@ export async function tryDispatchShopifyOrderJob({return false;}- await processShopifyOrderJob.dispatch(- {- workspaceId: checkout.workspaceId,- clickId: checkout.clickId,- order: checkout.order,- },- {- deduplicationId: `shopify-order-${checkoutToken}`,- },- );+ try {+ await processShopifyOrderJob.dispatch(+ {+ workspaceId: checkout.workspaceId,+ clickId: checkout.clickId,+ order: checkout.order,+ },+ {+ deduplicationId: `shopify-order-${checkoutToken}`,+ },+ );+ } catch (error) {+ await redis.hdel(key, "dispatched");+ throw error;+ }await shopifyCheckoutCache.delete(checkoutToken);