What is the best way to surface errors from a comp...
# package-authoring
h
What is the best way to surface errors from a component resource package? I can't seem to get a stack trace to show up but I'd like one.
l
I just throw a ResourceError. Can you expand on what's not working for you? • What language are you using? • Where are you throwing your error from (constructor, other method)? • Where are you expecting to see the error? • How are you using your ComponentResource that ought to be producing an error but isn't?
h
Wow I am so sorry I never saw this response @little-cartoon-10569. • What language are you using? ◦ Python • Where are you throwing your error from (constructor, other method)? ◦ the error originated deeper within the code, but iirc most of the problems we've had are with the runtime throwing errors • Where are you expecting to see the error? ◦ In the pulumi program within which I'm declaring an instance of the component resource. • How are you using your ComponentResource that ought to be producing an error but isn't? ◦ Just declaring it in a program in another language (TS, Go)
l
This won't answer your question, but: Typically, ComponentResources are defined in the language that they're used in. Multi-language packages typically export CustomResource classes, rather than the simpler, lighter-weight ComponentResource classes. Maybe there's something extra required for using ComponentResources across languages?
h
Yeah we originally wanted to adopt component resources for the advantage of using them across languages. Now we're just planning on settling on Go for everything
l
In and of themselves, ComponentResources aren't multi-language. You have to produce a multi-language package for that.