Skip to content

AGENTS.md: require translating domain-layer exceptions to HTTPException at FastAPI route boundaries#67221

Merged
choo121600 merged 1 commit into
apache:mainfrom
jason810496:ci/agents-md/add-api-exception-rule
May 20, 2026
Merged

AGENTS.md: require translating domain-layer exceptions to HTTPException at FastAPI route boundaries#67221
choo121600 merged 1 commit into
apache:mainfrom
jason810496:ci/agents-md/add-api-exception-rule

Conversation

@jason810496
Copy link
Copy Markdown
Member

@jason810496 jason810496 commented May 20, 2026

Why

Core API route handlers that let domain-layer ValueErrors (e.g., from MetastoreStateBackend) bubble up surface as 500 Internal Server Error, leaking internals and misleading clients. Capture the rule so future agents catch and re-raise as HTTPException with the right status.

What

  • Add one bullet under ## Coding Standards in root AGENTS.md directing agents to catch domain-layer exceptions in core_api route handlers and re-raise as HTTPException (404 not-found, 400 invalid input).

Was generative AI tooling used to co-author this PR?

@choo121600 choo121600 merged commit 2017b40 into apache:main May 20, 2026
64 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants