From c5e52191dea81c828071dc071f3599ef90e16cf1 Mon Sep 17 00:00:00 2001 From: clover caruso Date: Sat, 24 Oct 2026 18:30:23 -0700 Subject: [PATCH] Report MCP server errors instead of expiring the connection Any failure while authenticating an MCP request, including a full disk failing the token-renewal write, answered 401 and told clients to discard a valid token. Only authentication failures answer 401 now. Assisted-by: claude-opus-5.5 --- dashboard/src/mcp.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/dashboard/src/mcp.rs b/dashboard/src/mcp.rs index 65f042c521bdab1b64f1347fd7c9b76e1c9d3915..066257e8e5bf6533b23f597f501a4076f18ae07a 100644 --- a/dashboard/src/mcp.rs +++ b/dashboard/src/mcp.rs @@ -574,6 +574,7 @@ pub fn router( } next.run(request).await } + Err(error) if error.status != 401 => error.into_response(), Err(_) => ( StatusCode::UNAUTHORIZED, [( -- 2.54.1