Commit 65d62be
fix: propagate error messages in /mcp endpoint responses
Previously, exceptions in tool invocation were caught and an empty list was
returned, hiding error details from clients. Now errors are re-raised to let
the MCP SDK properly convert them to JSON-RPC error responses.
This ensures clients see actual error messages (e.g., '401 Unauthorized')
instead of empty responses.
Fixes #2570
Signed-off-by: Jonathan Fulton <jonathan@jonathanfulton.com>1 parent 4ec41c7 commit 65d62be
File tree
2 files changed
+6
-4
lines changed- mcpgateway/transports
- tests/unit/mcpgateway/transports
2 files changed
+6
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
639 | 639 | | |
640 | 640 | | |
641 | 641 | | |
642 | | - | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
643 | 645 | | |
644 | 646 | | |
645 | 647 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
264 | | - | |
| 264 | + | |
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
| |||
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
278 | | - | |
279 | | - | |
| 278 | + | |
| 279 | + | |
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
| |||
0 commit comments