From d1c3bfb9c98a94269654550de65c809012dc2001 Mon Sep 17 00:00:00 2001 From: Saadi Myftija Date: Fri, 5 Dec 2025 19:16:28 +0100 Subject: [PATCH] fix(deployments): ecr repo exists check (#2762) We recently upgraded the ECR sdk version. Our ECR repo exists check relies on the type of the error thrown and the new ECR sdk version seems to have broken that behavior. This PR adds a workaround to the issue. --- apps/webapp/app/v3/getDeploymentImageRef.server.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/webapp/app/v3/getDeploymentImageRef.server.ts b/apps/webapp/app/v3/getDeploymentImageRef.server.ts index 24ec7dbe8..70e602389 100644 --- a/apps/webapp/app/v3/getDeploymentImageRef.server.ts +++ b/apps/webapp/app/v3/getDeploymentImageRef.server.ts @@ -342,7 +342,10 @@ async function getEcrRepository({ return result.repositories[0]; } catch (error) { - if (error instanceof RepositoryNotFoundException) { + if ( + error instanceof RepositoryNotFoundException || + (error instanceof Error && error.message?.includes("does not exist")) + ) { logger.debug("ECR repository not found: RepositoryNotFoundException", { repositoryName, region,