Skip to content

Commit ca45ea5

Browse files
committed
fix(deployments): ecr repo exists check
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 ca45ea5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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)