Skip to content

fix: Tool Error Handling #222

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

fix: Tool Error Handling #222

wants to merge 1 commit into from

Conversation

monoxgas
Copy link
Contributor

@monoxgas monoxgas commented Jul 25, 2025

Notes

  • Reworking error handling for pipeline tools/parsing to give more control
  • Added docs to clarity how catch settings can be used to control when error surface.

Generated Summary

  • Introduced a new "catch" parameter in multiple API methods (e.g. until_parsed_as, using, and tool decorators) to allow overriding default error-catching behavior and control exception handling at both tool and pipeline levels.
  • Renamed the internal variable "until_types" to "until_parsed_as_types" (with an accompanying "until_parsed_as_catch") to better reflect its purpose in parsing-related error handling.
  • Extended the Message API by adding "tool_call_id" and "metadata" parameters to Message.from_model, enabling error metadata to be attached to messages.
  • Updated tool implementation in rigging/tools/base.py by:
    • Removing the tool call name mismatch warnings.
    • Improving error handling logic: using raw string formatting in JSON transforms to avoid serialization issues and preserving error information in message metadata.
    • Adding a "clone" and "with_" method to facilitate creating tool clones with updated parameters.
  • Revised documentation across API and topics files to:
    • Clarify the error handling hierarchy at the tool, pipeline, and parsing levels.
    • Document the new "catch" option and its defaults (e.g. catching JSONDecodeError and ValidationError by default).
    • Update examples for robust error management and debugging in tool-enabled pipelines.
  • Applied minor formatting and code style improvements for consistency and clarity in error handling and callback implementations.

This summary was generated with ❤️ by rigging

@monoxgas monoxgas requested a review from a team as a code owner July 25, 2025 01:41
@dreadnode-renovate-bot dreadnode-renovate-bot bot added area/docs Changes to documentation and guides type/docs Documentation updates and improvements labels Jul 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docs Changes to documentation and guides type/docs Documentation updates and improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant