https://pulumi.com logo
#general
Title
# general
c

creamy-monkey-35142

03/08/2024, 2:25 PM
Hi There! I’m working on Dynamic Resource Provider and looking for return github api response error inside module
Copy code
def create(self, args):
in other words, How I return error while creating resource error?
e

echoing-dinner-19531

03/08/2024, 5:07 PM
just raise an exception, it'll get translated to a resource error.
c

creamy-monkey-35142

03/09/2024, 12:53 PM
you mean Python try-catch function or something else?
e

echoing-dinner-19531

03/09/2024, 12:53 PM
as in
raise Error("thing went wrong")
c

creamy-monkey-35142

03/09/2024, 12:55 PM
I didn’t see
Error
in list below
e

echoing-dinner-19531

03/09/2024, 12:56 PM
Error was a stand-in. Just throw whatever error type makes sense for your error condition.
c

creamy-monkey-35142

03/09/2024, 1:09 PM
Thank you very much @echoing-dinner-19531