Skip to content

Commit 76f88c2

Browse files
iamtgrayThomas Gray
andauthored
Adding warn message for missing route to fix first part of #978 (#979)
Co-authored-by: Thomas Gray <tomgray@amazon.co.uk>
1 parent 8bcb005 commit 76f88c2

File tree

1 file changed

+4
-0
lines changed
  • src/deployments/cdk/src/deployments/transit-gateway

1 file changed

+4
-0
lines changed

src/deployments/cdk/src/deployments/transit-gateway/step-3.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,10 @@ function CreateRoute(props: {
235235
}
236236
} else {
237237
const routeId = routesMap[routeName];
238+
if (!routeId) {
239+
console.warn(`Cannot find route ${routeName} in transit gateway ${transitGateway.name}`);
240+
return;
241+
}
238242
CreateTransitGatewayRoute({
239243
scope,
240244
name: routeName,

0 commit comments

Comments
 (0)