Skip to content

Validate page param in Stats API breakdown endpoint - #6714

Open
ukutaht wants to merge 1 commit into
masterfrom
stats-breakdown-page-validation-6501
Open

ukutaht wants to merge 1 commit into
masterfrom
stats-breakdown-page-validation-6501

Conversation

@ukutaht

@ukutaht ukutaht commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

#6501

with changelog fixed.

The public Stats API `/api/v1/stats/breakdown` endpoint passed the
`page` query parameter directly into `String.to_integer/1`, which raises
`ArgumentError` on any non-numeric input, resulting in a 500 Internal
Server Error.

This mirrors the validation already applied to the sibling `limit`
parameter: invalid values now return a clean 400 response with a helpful
message instead of crashing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

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.

3 participants