fix(mcp): restore unrelated exception formatting

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
yassin 2026-09-02 16:05:37 +00:00
parent 35db36ee93
commit 22e3fcba54

View file

@ -259,7 +259,7 @@ if MCP_AVAILABLE:
if normalize_upstream_header_name(raw) is None:
raise HTTPException(
status_code=status.HTTP_400_BAD_REQUEST,
detail={ # mutable-ok: FastAPI exception detail requires a JSON-serializable dictionary
detail={
"error": (
f"Invalid upstream_token_header {raw!r}: must be a valid HTTP header name "
"(RFC 7230 token, e.g. 'esb-oauth')"