https://pulumi.com logo
Title
r

rhythmic-hair-33677

12/12/2019, 8:31 PM
I am experimenting with using
pulumi.ComponentResource
to build in some validation logic. What I am seeing is that if I throw a
pulumi.ResourceError
pulumi prints it twice with a stack trace. It appears that pulumi.ResourceError ignores my “hideStack = true” parameter. It also appears that apply occurs before or regardless of an error creating the output. I’m probably doing something wrong here, but I would like to have a single nice error displayed w/o the stack and only perform validation if the underlying resource create succeeds.
w

white-balloon-205

12/12/2019, 9:59 PM
I don't think there is any need to throw a
ResourceError
. If you just throw a normal
Error
- do you see the same?
r

rhythmic-hair-33677

12/12/2019, 10:07 PM
Yes. I’ll update the gist and open an issue.