diff --git a/src-tauri/src/networking/astrbot_client.rs b/src-tauri/src/networking/astrbot_client.rs index 24f91a9..2ff2ab9 100644 --- a/src-tauri/src/networking/astrbot_client.rs +++ b/src-tauri/src/networking/astrbot_client.rs @@ -525,9 +525,11 @@ impl AstrBotClient { status = status.as_u16(), "astrbot attachment request" ); - if status.as_u16() == 401 || status.as_u16() == 403 { - return Err(AstrBotClientError::HttpStatus(status)); - } + // A rejection is per-endpoint, not per-connection: `/api/chat/*` is the + // dashboard's own API and wants a dashboard JWT, while `/api/v1/*` + // accepts the API key the connection already holds. Aborting the whole + // search on the first 401 meant the remaining candidates were never + // tried at all. if !status.is_success() { return Ok(Err(format!("HTTP {}", status.as_u16()))); }