-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Fix unhandled exceptions in OpenAPI POST tool calls #3133
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
Changes from 2 commits
20c2e23
bd3c3cc
4ab87d1
29f231e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -218,6 +218,12 @@ async def run(self, arguments: dict[str, Any]) -> ToolResult: | |
| except httpx.RequestError as e: | ||
| raise ValueError(f"Request error ({type(e).__name__}): {e!s}") from e | ||
|
|
||
| except Exception as e: | ||
| raise ValueError( | ||
| f"Error building request for {self._route.method.upper()} " | ||
| f"{self._route.path}: {type(e).__name__}: {e}" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The new Useful? React with 👍 / 👎. |
||
| ) from e | ||
|
|
||
|
|
||
| class OpenAPIResource(Resource): | ||
| """Resource implementation for OpenAPI endpoints.""" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change modifies
docs/python-sdk/**, but the repository guideline in/workspace/fastmcp/AGENTS.mdstates "Never modifydocs/python-sdk/**(auto-generated)." Committing these generated line-reference updates creates avoidable churn and risks stale docs diffs being overwritten by generation tooling.Useful? React with 👍 / 👎.