You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(routes): fail closed when a response does not match its schema #429
Response schemas are how the API keeps responses minimal. When a response fails its own schema, defineRoute logs the mismatch and sends the raw payload anyway (src/lib/defineRoute.ts, around lines 351 to 362). Any controller that returns more than it should then leaks it, which is the case the validation exists to catch.
What
On a response schema mismatch, send a generic 500 (InternalErrorSchema) instead of the raw payload, and log the route and the failing paths
A test that a mismatching response is not sent
Generated contract tests still pass, so no current route trips this
Done when
No response that fails its schema reaches a client.
Activity