You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fromprefectimporttask, Flowdefhandler(*args, **kwargs):
raiseSyntaxError("unique informative message")
@task(state_handlers=[handler])defmy_task():
passf=Flow("reproducible-example", tasks=[my_task])
f.run()
# INFO - prefect.FlowRunner | Beginning Flow run for 'reproducible-example'# INFO - prefect.FlowRunner | Starting flow run.# DEBUG - prefect.FlowRunner | Flow 'reproducible-example': Handling state change from Scheduled to Running# INFO - prefect.TaskRunner | Task 'my_task': Starting task run...# DEBUG - prefect.TaskRunner | Task 'my_task': Handling state change from Pending to Running# INFO - prefect.TaskRunner | Task 'my_task': finished task run for task with final state: 'Failed'# INFO - prefect.FlowRunner | Flow run FAILED: some reference tasks failed.# DEBUG - prefect.FlowRunner | Flow 'reproducible-example': Handling state change from Running to Failed
We should see an ERROR log displaying a repr of the exception that was thrown inside the state handler.
The text was updated successfully, but these errors were encountered:
Example:
We should see an
ERROR
log displaying a repr of the exception that was thrown inside the state handler.The text was updated successfully, but these errors were encountered: