Files
homelable/mcp
Pouzor 71e78b4279 fix(mcp): carry the backend's error detail through to the client
raise_for_status raises httpx's own HTTPStatusError, whose message stops at the
status line and the URL. FastAPI's {"detail": ...} — the half that says what to
do about it — was dropped, so every rejection reached the calling AI as a bare
"Client error '422 Unprocessable Content'" with nothing to act on.

Replaces it with a BackendError naming the method, path, status and detail.
A structured detail (the approve-duplicate prompt answers with an object) is
serialized rather than lost, a non-JSON body falls back to its text, and the
whole thing is capped so an HTML error page can't land in the client's context.

ha-relevant: no
2026-09-09 01:19:19 +02:00
..
2026-03-13 16:45:51 +01:00