Hi community, does anyone know how to throw an exc...
# ask-the-community
y
Hi community, does anyone know how to throw an exception to be user exception within the execute function when writing backend plugin?
k
You can - return the error object in output writer
y
can I do something like def execute(): exception_scopes.user_entry_point(execute_helper())
k
Are you talking about backend plugin or python flytekit
y
TFJob, so it is a backend plugin
but it is a pythoninstanceTask since we handle the actual execution
I think this should work
k
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
173 Views