Skip to content

Commit 5bde75e

Browse files
committed
Raise exception if VPC not found
1 parent a374e45 commit 5bde75e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ecs_composex/vpc/vpc_aws.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@ def lookup_vpc_id(vpc_id_details: dict, lookup_session: Session) -> str:
104104
TypeName="AWS::EC2::VPC",
105105
Identifier=vpc_id,
106106
)
107-
except botocore.client.ClientError:
108-
LOG.error(f"{vpc_id} is not a valid VPC ID")
109-
return None
107+
except botocore.client.ClientError as error:
108+
LOG.exception(error)
109+
raise ValueError(f"{vpc_id} is not a valid VPC ID")
110110
if arn_from_arn:
111111
return vpc_arn
112112
else:

0 commit comments

Comments
 (0)