Skip to content

Commit

Permalink
Fix on_error Callbacks (#1526)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlonsoGuevara authored Dec 16, 2024
1 parent 9836643 commit 329b83c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .semversioner/next-release/patch-20241216204053395000.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "patch",
"description": "Fix exception on error callbacks"
}
2 changes: 1 addition & 1 deletion graphrag/index/run/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])

0 comments on commit 329b83c

Please sign in to comment.