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
1 files changed, 1 insertions(+), 0 deletions(-)
dashboard/src/mcp.rs+1
| ... | ... | @@ -574,6 +574,7 @@ pub fn router<H: rmcp::ServerHandler>( |
| 574 | 574 | } |
| 575 | 575 | next.run(request).await |
| 576 | 576 | } |
| 577 | Err(error) if error.status != 401 => error.into_response(), |
| 577 | 578 | Err(_) => ( |
| 578 | 579 | StatusCode::UNAUTHORIZED, |
| 579 | 580 | [( |