Skip to content

Commit c1b3819

Browse files
fix: [#49] SAM useless errors
1 parent 544d095 commit c1b3819

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/cloudFormation.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,13 @@ async function getCloudFormationResources(
7373
stackName: string,
7474
awsConfiguration: AwsConfiguration,
7575
) {
76+
// temporary disable console.error because SAM framework outputs useless errors
77+
const originalConsoleError = console.error;
78+
console.error = function () {};
7679
const { ListStackResourcesCommand } = await import(
7780
'@aws-sdk/client-cloudformation'
7881
);
82+
console.error = originalConsoleError;
7983

8084
const cloudFormationClient: CloudFormationClient =
8185
await getCloudFormationClient(awsConfiguration);

0 commit comments

Comments
 (0)