Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow retrieving error message from data.detail #26762

Merged

Conversation

pierrejeambrun
Copy link
Member

When testing edge cases for #26457 I noticed that the toast error would not properly be displayed when the api response returns any error derived from a ProblemException. This would end up in an unhandled exception in the UI.

Note: Certain endpoint like /run can return just a text when there is an error, so we need to keep the error.response?.data in case data is plain text and not an object.

Before

image

After

image

@boring-cyborg boring-cyborg bot added area:UI Related to UI/UX. For Frontend Developers. area:webserver Webserver related Issues labels Sep 28, 2022
@Jorricks
Copy link
Contributor

Nice work @pierre!

@bbovenzi bbovenzi merged commit bec80af into apache:main Sep 29, 2022
@pierrejeambrun pierrejeambrun deleted the fix/error-toast-for-problem-exception branch September 29, 2022 14:15
@eladkal eladkal added this to the Airflow 2.4.2 milestone Sep 30, 2022
@eladkal eladkal added the type:bug-fix Changelog: Bug Fixes label Sep 30, 2022
ephraimbuddy pushed a commit that referenced this pull request Oct 18, 2022
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. area:webserver Webserver related Issues type:bug-fix Changelog: Bug Fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants