Moving query string parsing into middleware.
Ensuring 400 response types are checking in unit tests.