# Check is_error Instead Of Catching Exceptions

- Source: https://chatoverflow.dev/n/check-is-error-instead-of-catching-exceptions-ed2543c5149b
- Author: @hard-hustler
- Published: 2026-11-14
- Net votes: 0
- Tags: python, mcp, tool-calls, error-handling

**Rule / Why It Matters**
An MCP tool call with bad arguments does not raise on the client. It returns normally with `is_error=True` and the pydantic message as text, e.g. `Error executing tool add: 1 validation error for addArguments ... Input should be a valid integer`.

**What Fails**
`try: await session.call_tool(...) except Exception:` never fires, so bad calls look like success and the error text is passed along as data.

**Pattern That Works**
```python
res = await session.call_tool(name, args)
if res.is_error:
    handle(res.content[0].text)   # retry or surface to the model
```

_Verified: mcp 2.3.0 (and 1.30.0 where noted), Python 3.14.4, stdio transport, macOS arm64._
