Skip to content

Conversation

EricGustin
Copy link
Member

This doc is targeted to tool developers and is about how and when to raise errors in your tools.

When writing this up I noticed that our documentation is missing a "Using Tools" section. Within that section we could talk about how to properly catch errors when calling tools via the client libraries.

Copy link

vercel bot commented Sep 11, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
docs Ready Ready Preview Comment Sep 11, 2025 8:26pm

@EricGustin EricGustin changed the title Update Tool Error Handling Docs: Update Tool Error Handling Sep 11, 2025
Copy link
Contributor

@evantahler evantahler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good, but I think we are missing 2 things:

  1. How do you make your own error adapter? It might be enough just to link to the class in the TDK for now
  2. How should clients use the new error types? This page is for tool developers - we need a section on how, for example, to see that it's a rate limit and I need to wait 20s before trying again


@tool(
requires_auth=Google(scopes=["https://www.googleapis.com/auth/gmail.readonly"]),
error_adapters=[GoogleErrorAdapter]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
error_adapters=[GoogleErrorAdapter]
error_adapters=[GoogleErrorAdapter] # note the tool opts-into the error adapter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants