Fix on_error Callbacks (#1526)

This commit is contained in:
Alonso Guevara 2024-12-16 14:56:41 -06:00 committed by GitHub
parent 983664397b
commit 329b83cf7f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View File

@ -0,0 +1,4 @@
{
"type": "patch",
"description": "Fix exception on error callbacks"
}

View File

@ -276,7 +276,7 @@ async def run_pipeline(
await _dump_stats(context.stats, context.storage)
except Exception as e:
log.exception("error running workflow %s", last_workflow)
cast("WorkflowCallbacks", callbacks).on_error(
cast("WorkflowCallbacks", callback_chain).on_error(
"Error running pipeline!", e, traceback.format_exc()
)
yield PipelineRunResult(last_workflow, None, [e])