Skip to content

fix: Callback Error Handling #216

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 24, 2025
Merged

fix: Callback Error Handling #216

merged 1 commit into from
Jul 24, 2025

Conversation

monoxgas
Copy link
Contributor

@monoxgas monoxgas commented Jul 23, 2025

  • Fix error handling for pipeline callbacks so they respect on_failed/catch settings

Generated Summary

  • Updated exception handling in the chat pipeline to assign errors directly to state.chat.error and mark state.chat.failed instead of raising immediately.
  • Replaced separate task iteration with a combined zip of states and tasks (using strict=True) to ensure proper exception detection.
  • Modified the asyncio.gather call to include return_exceptions=True, ensuring all tasks complete even when exceptions occur.
  • Wrapped the map callback invocation in a try/except block, allowing exceptions to be caught and assigned to all relevant chats.
  • Added new tests for both map and then callback exception handling to verify that RuntimeErrors are properly captured and propagated.

This summary was generated with ❤️ by rigging

@monoxgas monoxgas requested a review from a team as a code owner July 23, 2025 23:31
@dreadnode-renovate-bot dreadnode-renovate-bot bot added the area/tests Changes to test files and testing infrastructure label Jul 23, 2025
@monoxgas monoxgas merged commit 28017fd into main Jul 24, 2025
7 checks passed
@monoxgas monoxgas deleted the fix/callback-error-handling branch July 24, 2025 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/tests Changes to test files and testing infrastructure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant