Skip to content

fix(selection): reject a negative or non-numeric base price cap - #300

Merged
MoonBoi9001 merged 2 commits into
mb9/enforce-per-entity-price-ceilingfrom
mb9/reject-unusable-base-price-ceiling
Oct 26, 2026
Merged

MoonBoi9001 merged 2 commits into
mb9/enforce-per-entity-price-ceilingfrom
mb9/reject-unusable-base-price-ceiling

Conversation

@MoonBoi9001

@MoonBoi9001 MoonBoi9001 commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Both selection endpoints now refuse a max_grt_per_30_days that is negative, infinite or not a number with a 422, as #284 already does for the per-entity cap, and a NaN or infinite cap in a request body now gets that 422 instead of a 500. Such a value would otherwise quietly drop every indexer with a price. Stacked on #284.

@MoonBoi9001
MoonBoi9001 marked this pull request as ready for review October 23, 2026 11:21
@MoonBoi9001
MoonBoi9001 added this pull request to stack #306 October 23, 2026 11:22
@MoonBoi9001
MoonBoi9001 removed this pull request from stack #306 October 26, 2026 12:27
@MoonBoi9001
MoonBoi9001 added this pull request to stack #347 October 26, 2026 12:28
A base price ceiling of NaN, infinity or below 0 would quietly drop every priced indexer. Both
endpoints now refuse one with a 422, as they already do for the per-entity ceiling.
The standard error reply repeats the rejected value, and NaN or infinity can't be written as JSON,
so a bad price cap in a selection request crashed the reply. Such values are now sent as text.
@MoonBoi9001
MoonBoi9001 force-pushed the mb9/reject-unusable-base-price-ceiling branch from 4c7ceed to a28422f Compare October 26, 2026 12:34
@MoonBoi9001
MoonBoi9001 merged commit eba73a8 into main Oct 26, 2026
5 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.

1 participant