Skip to content

Allow retrieving error message from data.detail#26762

Merged
bbovenzi merged 1 commit intoapache:mainfrom
pierrejeambrun:fix/error-toast-for-problem-exception
Sep 29, 2022
Merged

Allow retrieving error message from data.detail#26762
bbovenzi merged 1 commit intoapache:mainfrom
pierrejeambrun:fix/error-toast-for-problem-exception

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.

4 participants