Scheduling infrastructure for absolutely everyone.
fix: skip retry when Trigger.dev deployment is already current (#27430)
Morgan72307b13c716
diff --git a/apps/api/v2/src/vercel-webhook.controller.ts b/apps/api/v2/src/vercel-webhook.controller.tsindex 3f2ace8a7d1..2e81176809f 100644--- a/apps/api/v2/src/vercel-webhook.controller.ts+++ b/apps/api/v2/src/vercel-webhook.controller.ts@@ -92,6 +92,12 @@ export class VercelWebhookController {if (error instanceof Error) {errorMessage = error.message;}++ if (errorMessage.includes("Deployment is already the current deployment")) {+ this.logger.log(`Deployment ${version} is already the current deployment, skipping retry`);+ return;+ }+this.logger.error(`Promotion attempt ${attempt} failed: ${errorMessage}`);if (attempt === maxRetries) throw error;