Channels
datahub-flyte
scipy-2023-workshop
flyte-school
agent-support-memverge
flyte-build
flyte-users-berlin
scipy-2023-sprint
auth
flyte-bazel
large-language-models
contribute
bioinformatics-computational-biology
great-content
in-flyte-conversations
flyte-on-gcp
show-and-tell
shameless-promotion
linkedin-flyte
random
deployment
hacktoberfest-2023
flyte-github
feature-discussions
linen-test
flytelab
flytekit-java
integrations
ray-on-flyte
conference-talks
release
flyte-ui-ux
workflow-building-ui-proj
writing-w-sfloris
jobs
hacktoberfest-2022
torch-elastic
flyte-console
engineeringlabs
helsing-flyte
flyte-documentation
konan-integration
databricks-integration
ray-integration
wg-gpu-types
flytekit
ecosystem-unionml
scipy-2022-sprint
announcements
ask-the-community
flyte-deployment
introductions
events
Powered by
#ask-the-community
Title
# ask-the-community
y
Yubo Wang
02/16/2023, 12:56 AM
Hi community, does anyone know how to throw an exception to be user exception within the execute function when writing backend plugin?
k
Ketan (kumare3)
02/16/2023, 2:39 AM
You can - return the error object in output writer
y
Yubo Wang
02/16/2023, 2:40 AM
can I do something like def execute(): exception_scopes.user_entry_point(execute_helper())
k
Ketan (kumare3)
02/16/2023, 6:37 AM
Are you talking about backend plugin or python flytekit
y
Yubo Wang
02/16/2023, 6:46 AM
TFJob, so it is a backend plugin
but it is a pythoninstanceTask since we handle the actual execution
I think this should work
k
Ketan (kumare3)
02/16/2023, 7:12 AM
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
8 Views
Post