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.
This commit is contained in:
Saadi Myftija
2025-12-05 19:16:28 +01:00
committed by GitHub
parent d8f5853457
commit d1c3bfb9c9
@@ -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,