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

Render errors when getting a list of dags #42897

Merged
merged 3 commits into from
Oct 11, 2024

Conversation

bbovenzi
Copy link
Contributor

Render error messages when getting a list of dags such as if the query params are incorrect:
Screenshot 2024-10-10 at 12 43 22 PM
Screenshot 2024-10-10 at 12 43 08 PM

Closes #42893

I had to do a few things to get this to work:

  1. Remove axios and switch our codegen to fetch. It was much easier to correctly catch the http error.

  2. Our opengen treats both error as unknown and error.body as unknown. Open GitHub issue on codegen. Therefore we had to manually assert a lot of the type values, even though they exist in the openapi spec. If there is a new error body type, we will have to manually update this ErrorAlert component.


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@boring-cyborg boring-cyborg bot added the area:UI Related to UI/UX. For Frontend Developers. label Oct 10, 2024
Copy link
Member

@pierrejeambrun pierrejeambrun left a comment

Choose a reason for hiding this comment

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

Too bad we can't use axios, lot of boilerplate is done for us. Now we have a bunch of mimetype manual handling and checking.

Do we still have the redirection, to login page on 401 ? (the former interceptor) ?

@bbovenzi
Copy link
Contributor Author

Too bad we can't use axios, lot of boilerplate is done for us. Now we have a bunch of mimetype manual handling and checking.

Do we still have the redirection, to login page on 401 ? (the former interceptor) ?

Actually, it was a bug in our interceptor. I put axios back in and restored our 401 check.

@bbovenzi bbovenzi merged commit a81066e into apache:main Oct 11, 2024
52 checks passed
@bbovenzi bbovenzi deleted the handle-get-dags-error branch October 11, 2024 11:53
@pierrejeambrun
Copy link
Member

Actually, it was a bug in our interceptor. I put axios back in and restored our 401 check.

Nice !

kunaljubce pushed a commit to kunaljubce/airflow that referenced this pull request Oct 13, 2024
* Render errors when getting a list of dags

* Restore axios, prettierignore pnpm-store

* Add pnpm-store to prettier ignore
pavansharma36 pushed a commit to pavansharma36/airflow that referenced this pull request Oct 14, 2024
* Render errors when getting a list of dags

* Restore axios, prettierignore pnpm-store

* Add pnpm-store to prettier ignore
R7L208 pushed a commit to R7L208/airflow that referenced this pull request Oct 17, 2024
* Render errors when getting a list of dags

* Restore axios, prettierignore pnpm-store

* Add pnpm-store to prettier ignore
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.

Handle request errors in new UI
2 participants