bbovenzi opened a new pull request, #42897:
URL: https://github.com/apache/airflow/pull/42897

   Render error messages when getting a list of dags such as if the query 
params are incorrect:
   <img width="838" alt="Screenshot 2024-10-10 at 12 43 22 PM" 
src="https://github.com/user-attachments/assets/fa27bcb1-23d5-48e8-82fd-0e18240eb62f";>
   <img width="772" alt="Screenshot 2024-10-10 at 12 43 08 PM" 
src="https://github.com/user-attachments/assets/455dd90f-f14e-40ab-88ed-363705afa85b";>
   
   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](https://github.com/7nohe/openapi-react-query-codegen/issues/147). 
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](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-guidelines)**
 for more information.
   In case of fundamental code changes, an Airflow Improvement Proposal 
([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals))
 is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party 
License Policy](https://www.apache.org/legal/resolved.html#category-x).
   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](https://github.com/apache/airflow/tree/main/newsfragments).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to