https://pulumi.com logo
#typescript
Title
# typescript
h

handsome-cat-98152

01/15/2020, 12:04 PM
What is the proper way of dealing with (runtime) Errors in Pulumi? Right now I'm just throwing an Error, is there a more suited best practice?
a

astonishing-cartoon-37000

01/15/2020, 4:58 PM
I typically just treat pulumi like any other JS/TS project. wrap exceptions in
try/catch/finally
"dealing" with errors in
catch
accordingly. If I want to log and exit, I log what I want and process.exit. If I want to retry something, I retry. etc ... I very much prefer this to relying on uncaught exceptions to stop my program and log the "throw". Just my opinion.
a

ambitious-ram-5811

01/15/2020, 5:11 PM
tbh, I always throw. Pulumi is already handling logging and process.exit'ing, manually killing the process is unnecessary imho
👍 1
a

astonishing-cartoon-37000

01/15/2020, 5:12 PM
that's fair!
h

handsome-cat-98152

01/17/2020, 7:27 AM
Thanks for the insights into your workflow!
2 Views