Skip to content

armgit / dbx

Public Imported from GitHub
0

25 MB lightweight cross-platform database client for 100+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 100+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP。

fix(milvus): send empty JSON body to databases/list endpoint

hhzorg4024dc6a679b
diff --git a/crates/dbx-core/src/db/vector_driver.rs b/crates/dbx-core/src/db/vector_driver.rs
index 3d413e0473..59aad278b7 100644
--- a/crates/dbx-core/src/db/vector_driver.rs
+++ b/crates/dbx-core/src/db/vector_driver.rs
@@ -183,7 +183,11 @@ pub async fn list_databases(client: &VectorClient) -> Result<Vec<String>, String
async fn list_milvus_databases(client: &VectorClient) -> Result<Vec<String>, String> {
// Older Milvus versions (pre-2.2) do not expose the databases endpoint; fall back to "default"
// so the connection stays browsable instead of failing the whole tree load.
- let body = match send_json(client.post("/v2/vectordb/databases/list"), "Milvus").await {
+ //
+ // The endpoint rejects a bodyless POST with `{"code":1801,...}` (HTTP 200, no `data` field),
+ // so send an empty JSON object like every other Milvus v2 endpoint.
+ let body = match send_json(client.post("/v2/vectordb/databases/list").json(&serde_json::json!({})), "Milvus").await
+ {
Ok(body) => body,
Err(_) => return Ok(vec!["default".to_string()]),
};