Skip to content

Commit

Permalink
fix: use the new error format when checking if an error is graceful
Browse files Browse the repository at this point in the history
  • Loading branch information
adrians5j committed Jun 20, 2024
1 parent aa8dbfb commit e6ce53a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/cwp-template-aws/cli/deploy/deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,12 @@ module.exports = async (inputs, context) => {

await sendEvent("cli-project-deploy-end");
} catch (e) {
if (e instanceof GracefulPulumiError) {
const gracefulError = e.cause?.gracefulError;
if (gracefulError instanceof GracefulPulumiError) {
await sendEvent("cli-project-deploy-error-graceful", {
errorMessage: e.message,
errorStack: e.stack
// Send original error message and stack.
errorMessage: e.cause.error?.message || e.message,
errorStack: e.cause.error?.stack || e.stack
});
} else {
await sendEvent("cli-project-deploy-error", {
Expand Down

0 comments on commit e6ce53a

Please sign in to comment.