Files
routstr-core/routstr/core
Jeroen UbbinkandClaude Opus 5 09e356b642 fix(api): answer a request-validation failure with a 422 that serializes
`json` parses the bare `Infinity`/`NaN` literals into real floats, so the
pricing edge rejects them correctly — but pydantic echoes the offending value
back in the error's `input` field, and JSONResponse encodes with
`allow_nan=False`. Serializing the 422 then raised "Out of range float values
are not JSON compliant" and the reply escaped as a 500, reporting a client's bad
rate as a server fault. The request already failed closed, so no row was ever
written.

Handle RequestValidationError explicitly and render non-finite floats as text,
which covers every endpoint rather than the pricing edge alone. The integration
app now copies the main app's exception handlers so a failing request fails the
way it does in production.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011cKHVF5LA7TR5QuYi6ErLM
2026-08-25 16:23:31 +02:00
..
2025-08-09 14:55:26 -03:00
2026-08-23 11:06:06 +02:00
2026-05-14 15:40:49 +02:00
2026-07-01 17:01:32 +02:00
2026-08-17 00:23:15 +02:00