Log MCPServer handler exceptions by kind and keep crash details off the wire (#3314)
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
This commit is contained in:
parent
f1c40b062f
commit
56af44727b
1 changed files with 1427 additions and 310 deletions
|
|
@ -79,8 +79,8 @@ There you go! You can now extend your tests to cover more scenarios.
|
|||
Two different things can go wrong, and this flag only touches one of them.
|
||||
|
||||
An exception inside one of **your tools** is not a protocol failure. It becomes a normal result with
|
||||
`is_error=True`, and the model reads the message. `raise_exceptions` doesn't change that: with or
|
||||
without it, `call_tool` returns the same `is_error=True` result. There's a whole page on it:
|
||||
`is_error=True` (and if it was a `ToolError`, the model reads your message). `raise_exceptions` doesn't
|
||||
change that: with or without it, `call_tool` returns the same `is_error=True` result. There's a whole page on it:
|
||||
**[Handling errors](../servers/handling-errors.md)**.
|
||||
|
||||
A failure **outside** a tool body is different. On the connection `Client(mcp)` gives you, the
|
||||
|
|
|
|||
Loading…
Reference in a new issue