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?
Code of Conduct
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 anHTTPExceptionwith a 409 status code. However, thedetailobject does not comply with the RFC 9457 format for problem details, as noted by an existingTODOin the codebase.Steps to reproduce
This is a code-level inconsistency marked by a
TODOcomment at line 217 inairflow-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
TODOby ensuring the error detail dictionary contains the standardtype,title,status,detail, andinstancefields as per RFC 9457, in addition to the existing custom keys (reasonandprevious_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?
Code of Conduct