You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by bb...@apache.org on 2026/08/24 13:25:45 UTC

(airflow) branch v3-3-test updated: [v3-3-test] Surface connection test errors in the UI instead of failing silently (#71954) (#71963)

This is an automated email from the ASF dual-hosted git repository.

bbovenzi pushed a commit to branch v3-3-test
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/v3-3-test by this push:
     new 0c5e03bf864 [v3-3-test] Surface connection test errors in the UI instead of failing silently (#71954) (#71963)
0c5e03bf864 is described below

commit 0c5e03bf8646c81753d30fe3b187641afebf9d4f
Author: github-actions[bot] <41...@users.noreply.github.com>
AuthorDate: Mon Aug 24 09:25:23 2026 -0400

    [v3-3-test] Surface connection test errors in the UI instead of failing silently (#71954) (#71963)
    
    Testing a connection only reported success or a failed test result; if the request itself errored the handler set the connection state to failed and showed nothing, leaving the user with a red icon and no explanation of what went wrong. Route those errors through the shared error toaster like every other mutation so the reason is shown.
    (cherry picked from commit ef32e9f69a563ad26e7991f6e55dde89b6fc6b8b)
    
    Co-authored-by: Pierre Jeambrun <pi...@gmail.com>
---
 airflow-core/src/airflow/ui/src/queries/useTestConnection.ts | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/airflow-core/src/airflow/ui/src/queries/useTestConnection.ts b/airflow-core/src/airflow/ui/src/queries/useTestConnection.ts
index 5a810a223ff..d5c15c77bda 100644
--- a/airflow-core/src/airflow/ui/src/queries/useTestConnection.ts
+++ b/airflow-core/src/airflow/ui/src/queries/useTestConnection.ts
@@ -22,6 +22,7 @@ import { useTranslation } from "react-i18next";
 import { useConnectionServiceTestConnection } from "openapi/queries";
 import type { ConnectionTestResponse } from "openapi/requests/types.gen";
 import { toaster } from "src/components/ui";
+import { createErrorToaster } from "src/utils";
 
 export const useTestConnection = (setConnected: Dispatch<SetStateAction<boolean | undefined>>) => {
   const { t: translate } = useTranslation("admin");
@@ -43,8 +44,9 @@ export const useTestConnection = (setConnected: Dispatch<SetStateAction<boolean
     }
   };
 
-  const onError = () => {
+  const onError = (error: unknown) => {
     setConnected(false);
+    createErrorToaster(error, { titleKey: "connections.testError.title" }, translate);
   };
 
   return useConnectionServiceTestConnection({