mcp: wrap json.loads in _send_request with MCPError #91

Closed
opened 2026-07-05 14:13:33 +00:00 by the.auditor · 0 comments
Owner

In src/kronai/mcp.py:169-174, json.loads() on the MCP response line is not wrapped. If the server returns malformed JSON, a json.JSONDecodeError propagates to the caller instead of a clean MCPError.

Wrap in try/except and raise MCPError.

From PR #88 review suggestion.

In `src/kronai/mcp.py:169-174`, `json.loads()` on the MCP response line is not wrapped. If the server returns malformed JSON, a `json.JSONDecodeError` propagates to the caller instead of a clean `MCPError`. Wrap in try/except and raise `MCPError`. _From PR #88 review suggestion._
fuzzy closed this issue 2026-07-05 16:45:54 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
thwap/kronai#91
No description provided.