KushagraB424 opened a new issue, #69360:
URL: https://github.com/apache/airflow/issues/69360

   ### Under which category would you file this issue?
   
   Airflow Core
   
   ### Apache Airflow version
   
   3.4.0
   
   ### What happened and how to reproduce it?
   
   **Issue Description**
   In `airflow/api_fastapi/execution_api/routes/task_instances.py`, when a 
client tries to start a task instance that is in an invalid state, it throws an 
`HTTPException` with a 409 status code. However, the `detail` object does not 
comply with the RFC 9457 format for problem details, as noted by an existing 
`TODO` in the codebase.
   
   **Steps to reproduce**
   This is a code-level inconsistency marked by a `TODO` comment at line 217 in 
`airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py`.
   
   
   ### What you think should happen instead?
   
   The code should be updated to resolve that `TODO` by ensuring the error 
detail dictionary contains the standard `type`, `title`, `status`, `detail`, 
and `instance` fields as per RFC 9457, in addition to the existing custom keys 
(`reason` and `previous_state`).
   
   
   ### Operating System
   
   _No response_
   
   ### Deployment
   
   None
   
   ### Apache Airflow Provider(s)
   
   _No response_
   
   ### Versions of Apache Airflow Providers
   
   Not Applicable
   
   ### Official Helm Chart version
   
   Not Applicable
   
   ### Kubernetes Version
   
   Not Applicable
   
   ### Helm Chart configuration
   
   Not Applicable
   
   ### Docker Image customizations
   
   Not Applicable
   
   ### Anything else?
   
   I already have a fix ready on my fork and will be submitting a PR for this 
shortly!
   
   
   ### Are you willing to submit PR?
   
   - [x] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


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