Skip to content

Commit

Permalink
Try and format error slightly differently to try and get past backwar…
Browse files Browse the repository at this point in the history
…ds compat tests
  • Loading branch information
rix0rrr committed Sep 13, 2024
1 parent da03003 commit e698a12
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/aws-cdk/lib/cdk-toolkit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,11 @@ export class CdkToolkit {

// It has to be exactly this string because an integration test tests for
// "bold(stackname) failed: ResourceNotReady: <error>"
throw new Error(`❌ ${chalk.bold(stack.stackName)} failed: ${e.constructor.name}: ${e.message}`);
throw new Error([
`❌ ${chalk.bold(stack.stackName)} failed:`,
...e.code ? [`${e.code}:`] : [],
e.message,
].join(' '));

// By the time you read this, the 'debug' can probably be removed, as
// the same commit that introduced this output to make the backwards
Expand Down

0 comments on commit e698a12

Please sign in to comment.