Testing the new explain analyze query param being added in PDB-5055 I noticed that validation errors were occurring when the param was included when querying routes under the query/v4. Top level queries against the v4 endpoint didn't cause an issue but queries against query/v4/resources would produce validation errors and cause the client making the request to hang. It also appeared that the database connection used for the query was stuck and not released after the error.
We should investigate both the cause of the validation errors and why we didn't return an error response to the client.