How can I suppress the stacktrace when I (intentio...
# typescript
s
How can I suppress the stacktrace when I (intentionally) throw an error?
l
Catch it?
s
@little-cartoon-10569 Yes. That’s we’re doing. We’re collecting internal thrown errors and then want to stop Pulumi proceeding with throwing them all at once.
Perhaps I’ve asked the wrong question. Let’ see:
What’s the intended way to stop Pulumi’s preview or update within Typescript code? Something else than throwing an error?
g
Throwing an error is the best way to stop a Pulumi application. This allows the Pulumi engine to do some of its own "cleanup" work at the end of execution.
s
@gentle-diamond-70147 Thanks. So, then back to my initial question: How can you suppress the stacktrace Pulumi shows? (I remember seeing a solution here in Slack, but it seems hidden in the 10k-messages limit).
g
I'm not aware of a way to suppress the stack trace from being printed.