Skip to content

fix(ui): show permission error when triggering DAG without permission#63018

Closed
jaymasiwal wants to merge 3 commits intoapache:mainfrom
jaymasiwal:fix-ui-trigger-permission-error
Closed

fix(ui): show permission error when triggering DAG without permission#63018
jaymasiwal wants to merge 3 commits intoapache:mainfrom
jaymasiwal:fix-ui-trigger-permission-error

Conversation

@jaymasiwal
Copy link
Copy Markdown
Contributor

What this PR does

Improves error handling when triggering a DAG without sufficient permissions.

Previously the UI displayed a generic "Forbidden" error message when the backend returned a 403 response.
This change detects the 403 response and shows a clearer permission-related message in the UI toast.

Changes

  • Detect 403 responses in useTrigger
  • Show triggerDag.permissionDenied message instead of generic error
  • Added missing i18n key for the permission error message

How it was tested

  • Ran Airflow locally using Breeze
  • Triggered a DAG as a user without permission
  • Verified that the UI now shows a clear permission error message
  • Verified UI builds successfully (pnpm build)
  • Verified lint passes (pnpm lint)

"intervalStart": "البداية",
"loading": "جارٍ تحميل معلومات Dag...",
"loadingFailed": "فشل تحميل معلومات Dag. يرجى المحاولة مرة أخرى.",
"permissionDenied": "You do not have permission to trigger this DAG.",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is obviously in wrong place ;-) This is the locale file for Arabic translation.

@jaymasiwal
Copy link
Copy Markdown
Contributor Author

Good catch, thanks!

I removed the English message from the Arabic locale file and removed the incorrect English locale file I added earlier. The PR has been updated.

@Srabasti
Copy link
Copy Markdown
Contributor

Srabasti commented Mar 9, 2026

Static checks are failing due to improper indentation for lines 65 through 86.
Please run prek locally in your branch before pushing to main @jaymasiwal !

@jason810496 jason810496 marked this pull request as draft March 9, 2026 09:54
@jason810496
Copy link
Copy Markdown
Member

@jaymasiwal This PR has been converted to draft because it does not yet meet our Pull Request quality criteria.

Issues found:

  • Pre-commit / static checks: Failing: CI image checks / Static checks. Run prek run --from-ref main locally to find and fix issues. See Pre-commit / static checks docs.

Note: Your branch is 93 commits behind main. Some check failures may be caused by changes in the base branch rather than by your PR. Please rebase your branch and push again to get up-to-date CI results.

What to do next:

  • The comment informs you what you need to do.
  • Fix each issue, then mark the PR as "Ready for review" in the GitHub UI - but only after making sure that all the issues are fixed.
  • Maintainers will then proceed with a normal review.

Converting a PR to draft is not a rejection — it is an invitation to bring the PR up to the project's standards so that maintainer review time is spent productively. If you have questions, feel free to ask on the Airflow Slack.

@potiuk potiuk added the ready for maintainer review Set after triaging when all criteria pass. label Apr 2, 2026
@potiuk potiuk marked this pull request as ready for review April 2, 2026 16:07
@potiuk
Copy link
Copy Markdown
Member

potiuk commented Apr 2, 2026

There are conflicts to resolve

@pierrejeambrun
Copy link
Copy Markdown
Member

pierrejeambrun commented Apr 3, 2026

This was fixed globally by #61588, closing.

Feel free to re-open if I missed something.

Screenshot 2026-04-03 at 18 39 54

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:translations area:UI Related to UI/UX. For Frontend Developers. ready for maintainer review Set after triaging when all criteria pass. translation:ar

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants