Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

feat: Fixed the issue where the test database connection was successful but the prompt message showed that there was no error status #1739 (#2051)

balibabu20f3f547141d
diff --git a/web/src/hooks/flow-hooks.ts b/web/src/hooks/flow-hooks.ts
index 19fe558889..ec1d950b9c 100644
--- a/web/src/hooks/flow-hooks.ts
+++ b/web/src/hooks/flow-hooks.ts
@@ -201,7 +201,7 @@ export const useTestDbConnect = () => {
mutationKey: ['testDbConnect'],
mutationFn: async (params: any) => {
const ret = await flowService.testDbConnect(params);
- if (ret?.retcode === 0) {
+ if (ret?.data?.retcode === 0) {
message.success(ret?.data?.data);
} else {
message.error(ret?.data?.data);