Skip to content

Surface connection test errors in the UI instead of failing silently - #71954

Merged
bbovenzi merged 1 commit into
apache:mainfrom
astronomer:surface-test-connection-errors-in-ui
Aug 21, 2026
Merged

bbovenzi merged 1 commit into
apache:mainfrom
astronomer:surface-test-connection-errors-in-ui

Conversation

@pierrejeambrun

Copy link
Copy Markdown
Member

When testing a connection from the UI, only a successful test or a failed test result (HTTP 200 with status=false) showed a message. If the request itself errored (e.g. an unexpected 500, or a 404), useTestConnection's onError just set the connection state to failed and showed nothing — leaving the user with a red icon and no explanation, exactly as reported ("I only get a red wifi with crossbeam across it … it should tell me if the connection succeeded or not").

This routes those errors through the shared createErrorToaster used by every other mutation, so the reason is shown. 403 (testing disabled) continues to be handled by the global MutationCache handler, unchanged.

Scope note: I could not reproduce the CLI airflow connections test "conn_id isn't defined" half on current main — it now resolves the connection and reports the real hook error — so this addresses the UI silent-failure, which is the reproducible part of the report.

closes: #58567


Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Opus 4.8)

Generated-by: Claude Code (Opus 4.8) following the guidelines

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.
@boring-cyborg boring-cyborg Bot added the area:UI Related to UI/UX. For Frontend Developers. label Aug 21, 2026
@pierrejeambrun pierrejeambrun added this to the Airflow 3.3.2 milestone Aug 21, 2026
@pierrejeambrun
pierrejeambrun marked this pull request as ready for review August 21, 2026 15:10
@bbovenzi
bbovenzi merged commit ef32e9f into apache:main Aug 21, 2026
142 of 147 checks passed
@bbovenzi
bbovenzi deleted the surface-test-connection-errors-in-ui branch August 21, 2026 19:46
@github-actions

Copy link
Copy Markdown
Contributor

Backport successfully created: v3-3-test

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
✅ v3-3-test PR Link

aws-airflow-bot pushed a commit to aws-mwaa/upstream-to-airflow that referenced this pull request Aug 21, 2026
…ng silently (apache#71954)

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 ef32e9f)

Co-authored-by: Pierre Jeambrun <[email protected]>
bbovenzi pushed a commit that referenced this pull request Aug 24, 2026
…ng 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 ef32e9f)

Co-authored-by: Pierre Jeambrun <[email protected]>
vatsrahul1001 pushed a commit that referenced this pull request Sep 7, 2026
…ng 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 ef32e9f)

Co-authored-by: Pierre Jeambrun <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:UI Related to UI/UX. For Frontend Developers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test connection not working

2 participants