Hi community, does anyone know how to throw an exc...
# flyte-support
l
Hi community, does anyone know how to throw an exception to be user exception within the execute function when writing backend plugin?
f
You can - return the error object in output writer
l
can I do something like def execute(): exception_scopes.user_entry_point(execute_helper())
f
Are you talking about backend plugin or python flytekit
l
TFJob, so it is a backend plugin
but it is a pythoninstanceTask since we handle the actual execution
I think this should work
f
Ohh you want the user side to raise exception
Yes you can raise anything, but if you want a nice error - https://github.com/flyteorg/flytekit/blob/master/flytekit/exceptions/user.py
If you raise system - you will see it marked as system exception in UI
216 Views