Skip to content

fix(api): return 422 for missing fetcher query params - #7671

Open
bozarnr wants to merge 1 commit into
openbq-org:developfrom
bozarnr:fix/fetcher-validation-status
Open

bozarnr wants to merge 1 commit into
openbq-org:developfrom
bozarnr:fix/fetcher-validation-status

Conversation

@bozarnr

@bozarnr bozarnr commented Sep 23, 2026

Copy link
Copy Markdown

Closes #7629. Maps missing required fields from fetcher QueryParams validation to HTTP 422 and adds a focused regression test. Tests: pytest targeted regression; ruff targeted files.

Copilot AI lite review requested due to automatic review settings September 23, 2026 06:49
@CLAassistant

CLAassistant commented Sep 23, 2026 •

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

Preserve the parameter source for missing body fields and add body regression coverage.

Review effort: Lite
Findings: None

What changed in this PR

This PR updates API validation so missing fetcher parameters return HTTP 422 instead of 500.

Changes:

  • Adjusts missing-field validation handling.
  • Adds regression coverage for missing category.
File Summary
openbb_platform/​core/​tests/​api/​test_exception_handlers.py Adds regression coverage for missing fetcher parameters.
openbb_platform/​core/​openbb_core/​api/​exception_handlers.py Updates validation-error classification.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@bozarnr
bozarnr force-pushed the fix/fetcher-validation-status branch from 48fe1cd to 8d33c12 Compare October 15, 2026 18:12

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Fetcher-level pydantic ValidationError returns 500 "Unexpected Error" instead of 422 (e.g. bls_search without category)

3 participants