sparse-intern-71089
08/01/2019, 11:31 AMwhite-balloon-205
undefined here looks like i means you somehow had code throw an error that didn't have either a stack or message property - most common if something other than an Error was thrown. Could this have been from your own code somewhere? (do you have any throw statements of your own?)future-morning-96441
08/01/2019, 2:09 PMfuture-morning-96441
08/02/2019, 10:24 AMthrow new Error("someMessage");, I still get the same error-message on deployment.
I tried running deployment with pulumi up -d -v 99 --logtostderr but couldn't find any more information why or where this undefined exception is coming from.
If I understood correctly Pulumi tries to access Error.stack and Error.message on an unhandled exception. Is it somehow possible to log the actual unhandled exception and not just properties of it?
I'd like to add something like:
if(!(err instanceof Error)) {
console.log("Unhandled Exception which is not an Error:", err);
}
to the uncaughtHandler in the pulumi nodejs sdk. How is the build process, to respect changes I make in the node_modules directory of ´@pulumi/pulumi` when I run pulumi up.white-balloon-205
How is the build process, to respect changes I make in the node_modules directory of ´@pulumi/pulumi` when I runYou can make changes in.pulumi up
node_modues and they will get picked up.
Is it somehow possible to log the actual unhandled exception and not just properties of it?Yes - we should probably try `toString`ing the thrown value itself after trying it's
stack and message properties.
I'd like to add ... to theYou could also try adding your ownuncaughtHandler
process.on('uncaughtException', () => {}).future-morning-96441
08/02/2019, 1:41 PMprocess.on approach at the top of the pulumi application first, but for some reason this didn't work.
I added console.log("unhandled exception:", err); in @pulumi/pulumi/cmd/run/run.js:176 and @pulumi/pulumi/cmd/run-policy-pack/run.js:180, which got me the information I needed! 🙂
I forgot braces at my first attempt of conditionally logging the error, which made me think my changes weren't picked up by pulumi.
Thanks a lot Luke!