Skip to content

API: Translate domain ValueError to HTTPException in Asset State Store routes - #74179

Open
Kaap10 wants to merge 2 commits into
apache:mainfrom
Kaap10:fix-asset-state-store-domain-exceptions
Open

Kaap10 wants to merge 2 commits into
apache:mainfrom
Kaap10:fix-asset-state-store-domain-exceptions

Conversation

@Kaap10

@Kaap10 Kaap10 commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Catch domain-level ValueErrors in asset_state_store route handlers and translate them to HTTP 400 Bad Request errors. Previously, these were unhandled and surfaced as HTTP 500 Internal Server Errors, leaking internal traces.

This implements the same exception translation pattern already established in task_state_store.py.


Was generative AI tooling used to co-author this PR?
  • Yes (Antigravity AI Assistant)

Generated-by: Antigravity following the guidelines


  • 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, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

…e routes

Catch domain-level ValueErrors in asset_state_store route handlers and translate them to HTTP 400 errors rather than allowing unhandled 500 Internal Server Errors.
@Kaap10

Kaap10 commented Oct 4, 2026

Copy link
Copy Markdown
Contributor Author

Hi Team,
This PR is ready for review. All core, DB (Postgres/MySQL/SQLite), and integration tests are passing cleanly.

The single failure in the Static checks job appears to be caused by a transient prek hook cache issue on the runner (insert_license: No such file or directory). Could a maintainer please trigger a quick re-run for that job when taking a look?

Thanks!

@fat-catTW fat-catTW left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants