fix(UI): show 403 error when unauthorized user reparses DAG#61560
fix(UI): show 403 error when unauthorized user reparses DAG#61560pierrejeambrun merged 3 commits intoapache:mainfrom
Conversation
|
Can we check the actual API error response to see if we're just presenting the wrong message? It would be better to send and display the correct errors from the API instead of manually creating error messages in the UI |
pierrejeambrun
left a comment
There was a problem hiding this comment.
LGTM and working as expected, thanks.
Just one nit.
API just returns We can globally remap the |
|
Yes lets make a single generic 403 message to use across the UI |
pierrejeambrun
left a comment
There was a problem hiding this comment.
Update: I chatted with Brent, we believe a generic handler is better
|
@liamkernan can you handle the open comments? |
|
Finished; let me know if there's anything else I can tweak or improve. |
|
Moved to 3.1.9 as the PR is not ready yet cc @pierrejeambrun |
…e DAG When a Viewer or Author without edit permission tries to reparse a DAG, the API returns 403 but the UI shows a generic "Dag parsing request failed" message. This checks the error status and shows an appropriate "Access Denied" toast instead. Closes apache#61459 Co-authored-by: Cursor <cursoragent@cursor.com>
Move the forbidden toast copy to common translations and route DAG reparse mutation errors through a shared error toaster helper so 403 responses consistently show a reusable access-denied message. Made-with: Cursor
pierrejeambrun
left a comment
There was a problem hiding this comment.
Looking good, just one nit.
72f0bdd to
f9a0aa4
Compare
|
I just pushed the small adjustment, ready to merge :) |
|
Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions. |
…AG (#61560) * fix(UI): show permission error when unauthorized user tries to reparse DAG When a Viewer or Author without edit permission tries to reparse a DAG, the API returns 403 but the UI shows a generic "Dag parsing request failed" message. This checks the error status and shows an appropriate "Access Denied" toast instead. Closes #61459 Co-authored-by: Cursor <cursoragent@cursor.com> * Generalize 403 permission toast handling in UI Move the forbidden toast copy to common translations and route DAG reparse mutation errors through a shared error toaster helper so 403 responses consistently show a reusable access-denied message. Made-with: Cursor * Small adjustments --------- (cherry picked from commit f01c69a) Co-authored-by: Liam <liamkernan0@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: pierrejeambrun <pierrejbrun@gmail.com>
Backport successfully created: v3-1-testNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
|
…AG (#61560) (#63339) * fix(UI): show permission error when unauthorized user tries to reparse DAG When a Viewer or Author without edit permission tries to reparse a DAG, the API returns 403 but the UI shows a generic "Dag parsing request failed" message. This checks the error status and shows an appropriate "Access Denied" toast instead. Closes #61459 * Generalize 403 permission toast handling in UI Move the forbidden toast copy to common translations and route DAG reparse mutation errors through a shared error toaster helper so 403 responses consistently show a reusable access-denied message. Made-with: Cursor * Small adjustments --------- (cherry picked from commit f01c69a) Co-authored-by: Liam <liamkernan0@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: pierrejeambrun <pierrejbrun@gmail.com>
…1560) * fix(UI): show permission error when unauthorized user tries to reparse DAG When a Viewer or Author without edit permission tries to reparse a DAG, the API returns 403 but the UI shows a generic "Dag parsing request failed" message. This checks the error status and shows an appropriate "Access Denied" toast instead. Closes apache#61459 Co-authored-by: Cursor <cursoragent@cursor.com> * Generalize 403 permission toast handling in UI Move the forbidden toast copy to common translations and route DAG reparse mutation errors through a shared error toaster helper so 403 responses consistently show a reusable access-denied message. Made-with: Cursor * Small adjustments --------- Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: pierrejeambrun <pierrejbrun@gmail.com>
…1560) * fix(UI): show permission error when unauthorized user tries to reparse DAG When a Viewer or Author without edit permission tries to reparse a DAG, the API returns 403 but the UI shows a generic "Dag parsing request failed" message. This checks the error status and shows an appropriate "Access Denied" toast instead. Closes apache#61459 Co-authored-by: Cursor <cursoragent@cursor.com> * Generalize 403 permission toast handling in UI Move the forbidden toast copy to common translations and route DAG reparse mutation errors through a shared error toaster helper so 403 responses consistently show a reusable access-denied message. Made-with: Cursor * Small adjustments --------- Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: pierrejeambrun <pierrejbrun@gmail.com>
…1560) * fix(UI): show permission error when unauthorized user tries to reparse DAG When a Viewer or Author without edit permission tries to reparse a DAG, the API returns 403 but the UI shows a generic "Dag parsing request failed" message. This checks the error status and shows an appropriate "Access Denied" toast instead. Closes apache#61459 Co-authored-by: Cursor <cursoragent@cursor.com> * Generalize 403 permission toast handling in UI Move the forbidden toast copy to common translations and route DAG reparse mutation errors through a shared error toaster helper so 403 responses consistently show a reusable access-denied message. Made-with: Cursor * Small adjustments --------- Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: pierrejeambrun <pierrejbrun@gmail.com> (cherry picked from commit f01c69a)
When a Viewer/Author tries to reparse a DAG, the API correctly returns 403 but the UI shows a misleading generic error ("Dag parsing request failed"). This checks the error status code and shows an "Access Denied" toast for 403 responses instead.
Closes #61459
Made with Cursor