Compare commits

...

1 commit

Author SHA1 Message Date
William Easton
59b19eb549
Fix error classification using __cause__ instead of raised exception type
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 18:31:05 -05:00

View file

@ -89,7 +89,7 @@ class ErrorHandlingMiddleware(Middleware):
return error
# Map common exceptions to appropriate MCP error codes
error_type = type(error.__cause__) if error.__cause__ else type(error)
error_type = type(error)
if error_type in (ValueError, TypeError):
return McpError(