Skip to content

Fix request handling issues and add CI - #4

Merged
Siyet merged 1 commit into
mainfrom
request-handling-fixes
Oct 18, 2026
Merged

Siyet merged 1 commit into
mainfrom
request-handling-fixes

Conversation

@Siyet

@Siyet Siyet commented Oct 17, 2026

Copy link
Copy Markdown
Owner

Part of #3 (step 1).

  • A body without a Content-Type header follows FastAPI's strict_content_type: 415 by
    default, JSON when the setting is False. A Content-Type header with an empty media
    type, such as ; charset=utf-8, is rejected with 415.
  • Deeply nested JSON returns 400 instead of 500.
  • A NaN or infinite float in a typed response is encoded as null. When the JSON round
    trip of a response fails validation, the Python values are validated instead, so the
    result for values that pass the round trip does not change. If that check finds a
    validation error, that error is reported, because it points at the actual problem.
  • Body validation errors (422) are raised after dependencies, as in FastAPI. Malformed or
    too deeply nested JSON (400) and a missing or non-JSON content type (415) are rejected
    before dependencies. When parameters are also invalid, only the parameter errors are
    reported.
  • -> None declares no response model, as in FastAPI.
  • Form() and File() parameters are left to FastAPI; a Struct in such a parameter is
    rejected at registration with a clear error.
  • A CI workflow runs the tests on Python 3.11 to 3.14 with the latest and the lowest
    supported FastAPI and msgspec, and checks the built distributions.

The README describes the new behavior.

@Siyet
Siyet merged commit 65274f8 into main Oct 18, 2026
9 checks passed
@Siyet Siyet mentioned this pull request Oct 18, 2026
7 of 25 tasks
@Siyet
Siyet deleted the request-handling-fixes branch October 19, 2026 17:37
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