Patch release completing the RFC 9457 error surface. No breaking changes.
Fixed
- FastAPI request validation failures (a malformed request body, a missing required field, or an out-of-range query parameter such as
?page=0on a list route) were still returned as FastAPI's default{"detail": [...]}body withapplication/json, because onlypydantic.ValidationErrorwas routed through the Problem Details handler.RequestValidationErrornow produces the same422 application/problem+jsonresponse as other validation errors: genericdetail, atrace_id, and the structured error list under theerrorsextension withloc,type, andmsgpreserved.
Upgrading
Drop-in for 2.0.x users. Clients that parsed the top-level detail list of a 422 should read the errors member of the Problem Details body instead; the entries are unchanged.
What's Changed
- fix(api): return Problem Details for FastAPI request validation errors by @mortenoh in #40
- chore: release 2.0.2 by @mortenoh in #41
Full Changelog: v2.0.1...v2.0.2