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

   ### Sumarry
   
   Error toasters raised by `createErrorToaster()` reported only the HTTP 
status phrase, so a user who hit a rejected action saw `Conflict` or `Bad 
Request` instead of the reason the API had already sent them.
   
   `getErrorMessage()` in `errorHandling.ts` read `error.message`, and for the 
generated client that field never carries the API's own explanation: it comes 
from the status-code table in `openapi-gen/requests/core/request.ts`, which 
maps every response to a bare phrase. The reason lives in `error.body.detail`, 
which was dropped.
   
   `ErrorAlert` already knew how to render that field in all three shapes 
FastAPI returns it in (a plain string, a list of validation errors, an object 
keyed by field). This extracts that logic into a shared `getErrorDetail()` and 
has both `ErrorAlert` and `createErrorToaster()` use it, so every screen that 
reports errors through a toaster gains the real message.
   
   ### Before / after
   
   Deleting a Dag run that is still running returns:
   - Before: the toaster said `Conflict`.
   
   <img width="1592" height="871" alt="image" 
src="https://github.com/user-attachments/assets/1ef5fe1f-b6d4-4c37-8e0d-93f99e602da7";
 />
   
   - After: the toaster says why the run cannot be deleted.
   <img width="1690" height="858" alt="image" 
src="https://github.com/user-attachments/assets/55fcb7fd-9aef-4294-ac14-ace05e6b9df9";
 />
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Code (Opus 5)


-- 
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