Skip to content

Comments

Implement RFC 9457 compliant error response for ti_run endpoint#62400

Open
MonsterChenzhuo wants to merge 1 commit intoapache:mainfrom
MonsterChenzhuo:pr4
Open

Implement RFC 9457 compliant error response for ti_run endpoint#62400
MonsterChenzhuo wants to merge 1 commit intoapache:mainfrom
MonsterChenzhuo:pr4

Conversation

@MonsterChenzhuo
Copy link
Contributor

Description

This PR implements RFC 9457 (Problem Details for HTTP APIs) compliant error responses for the ti_run endpoint in the Execution API, addressing the TODO left in the code.

When a Task Instance cannot be marked as running (e.g., due to an invalid state), the API now returns a structured error response containing standard fields like type , title , status , detail , and instance , while preserving existing context fields.


Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

@henry3260
Copy link
Contributor

Should we standardize all HTTP responses in task_instances.py to follow RFC 9457?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:API Airflow's REST/HTTP API area:task-sdk

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants