<@U06RKAMK0UC> I have `flyteconnector: enabled: tr...
# ask-ai
p
@ancient-wolf-19325 I have
flyteconnector: enabled: true
in my helm chart, I am using
WebhookTask
and trying to catch error in my tasks on
workflow
level. The error is not seen outside the
task
and only the task fails. Is there any additional configuring to be done so I can
try, except
in a
workflow
j
Flyte workflows do not support standard Python try/except error handling at the workflow level. Workflow code is a domain-specific language (DSL) for building execution graphs, not regular Python, so exceptions raised in tasks cannot be caught with try/except in the workflow body. Instead, Flyte provides workflow-level error handling using the failure node feature, where you can specify an on_failure task or workflow to execute if any node fails. However, this does not allow you to recover and continue execution in the workflow after a failure—execution will still be marked as failed, and the failure handler is only for cleanup or notification purposes, not for resuming normal workflow logic (Flyte failure node docs, Flyte core concepts). If you need to continue workflow execution after a task fails (i.e., "catch" the error and proceed), this is not natively supported in Flyte's workflow DSL. The only supported mechanism is to use the on_failure handler for cleanup or notification, not for resuming workflow logic. There is ongoing discussion in the community about adding more flexible error handling (like try/catch or allowing some nodes to fail without failing the workflow), but as of now, this is not available (Flyte GitHub issue #5513, Flyte GitHub issue #878). Would you like more detail or example code for using the failure node/on_failure handler? Sources: - Flyte failure node docs - Flyte GitHub issue #5513 - Flyte GitHub issue #878 - Flyte core concepts 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.
p
@ancient-wolf-19325 in Flyte documentation there is example on how
try, except
works in
workflow
level https://www.union.ai/docs/flyte/deployment/flyte-configuration/configuring-notifications/ is this wrong?
j
The example at https://www.union.ai/docs/flyte/deployment/flyte-configuration/configuring-notifications/ shows a Python try/except block inside a workflow function, but this is not supported in Flyte's workflow DSL. In Flyte, workflow bodies are not regular Python—they are parsed to build an execution graph, and Python control flow like try/except does not work as expected. The example is illustrative for notification tasks, but actual error handling at the workflow level must use the on_failure handler or failure node, not Python try/except (Flyte core concepts, Flyte GitHub issue #4573). So, the documentation's use of try/except in a workflow is misleading—Flyte does not support catching task exceptions with Python try/except at the workflow level. Sources: - Flyte GitHub issue #4573 - https://www.union.ai/docs/flyte/deployment/flyte-configuration/configuring-notifications/ - Flyte core concepts 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.