Skip to content

Commit 2d123e7

Browse files
committed
Drop troubleshooting raise_exceptions tip duplication.
Keep the full semantics on the Testing page and the low-level-server cross-link; the troubleshooting tip restated the same material.
1 parent 0840a9f commit 2d123e7

1 file changed

Lines changed: 0 additions & 9 deletions

File tree

docs/troubleshooting.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,6 @@ async def main() -> None:
5656
down this page) escapes from `async with` itself, so there is no "inside" to catch it in.
5757
For those, read the bottom of the group.
5858

59-
!!! tip
60-
Seeing only `MCPError: Internal server error` in an in-memory test? That is the sanitised
61-
form of an unexpected handler crash. `Client(mcp, raise_exceptions=True)` keeps the
62-
`MCPError` but puts the real message on it and chains the original as `__cause__` — still
63-
catch `MCPError` inside the block. The flag is ignored for URL/transport clients, does not
64-
turn a tool's `is_error=True` into an exception, and should be dropped on
65-
`mode="legacy"`. **[Testing](get-started/testing.md)** is the full story.
66-
6759
## `RuntimeError: Client must be used within an async context manager`
6860

6961
`Client(...)` only builds the object. Nothing connects until `async with`, so every method refuses:
@@ -412,7 +404,6 @@ mcp = MCPServer("Weather", request_state_security=RequestStateSecurity(keys=[key
412404
## Recap
413405

414406
* `ExceptionGroup: unhandled errors in a TaskGroup` is never the error. Read the **last line**; catching `MCPError` *inside* the `async with Client(...)` block skips the wrapping entirely.
415-
* In-memory `MCPError: Internal server error` is a sanitised handler crash; `raise_exceptions=True` unsanitises the message and `__cause__` (see **[Testing](get-started/testing.md)**).
416407
* `call_tool` does not raise for a failing tool. `Error executing tool ...` and `Unknown tool: ...` are results: check `result.is_error`.
417408
* `Client must be used within an async context manager` -> use `async with`. `Use @tool() instead of @tool` -> add the parentheses.
418409
* `Tool already exists:` in the server log is the only sign that two same-named tools collapsed into one.

0 commit comments

Comments
 (0)