What is the proper way of dealing with (runtime) E...
# typescript
h
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
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
tbh, I always throw. Pulumi is already handling logging and process.exit'ing, manually killing the process is unnecessary imho
👍 1
a
that's fair!
h
Thanks for the insights into your workflow!