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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user