Skip to content

Commit d1c3bfb

Browse files
authored
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.
1 parent d8f5853 commit d1c3bfb

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

apps/webapp/app/v3/getDeploymentImageRef.server.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,10 @@ async function getEcrRepository({
342342

343343
return result.repositories[0];
344344
} catch (error) {
345-
if (error instanceof RepositoryNotFoundException) {
345+
if (
346+
error instanceof RepositoryNotFoundException ||
347+
(error instanceof Error && error.message?.includes("does not exist"))
348+
) {
346349
logger.debug("ECR repository not found: RepositoryNotFoundException", {
347350
repositoryName,
348351
region,

0 commit comments

Comments
 (0)