Comments

josephdpurcell created an issue. See original summary.

josephdpurcell’s picture

Retrying to fix the core_version_requirement error in the test.

josephdpurcell’s picture

Retrying to fix the lack of return type void error.

josephdpurcell’s picture

Retrying to fix the modules must be declared protected. (Side note: why do these errors not show up when I run tests locally?)

josephdpurcell’s picture

It worked! Ok, we can ignore all the previous tests. Here's the real deal:

jsonapi-9.1.0-fix-poison-query-string-cache-3085360-6.patch -- this should pass the test
jsonapi-9.1.0-fix-poison-query-string-cache-3085360-6-test-only.patch -- this should fail saying it expected application/json but got text/html

Setting to needs review.

Status: Needs review » Needs work
josephdpurcell’s picture

Meh. I had the wrong ticket ID in the patch name. Uploading correctly named patches now.

josephdpurcell’s picture

Status: Needs work » Needs review

Great, that worked as expected! Setting to Needs Review.

bradjones1’s picture

Title: JSON API ONLY: RouteProvider::getRouteCollectionForRequest() can poison query string of next request » Use api_json format on exception responses for api_json resources
Issue summary: View changes
Status: Needs review » Closed (duplicate)

Updating the title and description to match what I think your intent is here; as mentioned in our discussions over at #3085360: RouteProvider::getRouteCollectionForRequest() can poison query string of next request I think this is a separate issue, judging by the test introduced in your patch. I've tried to encapsulate what I think your goal is, in the new title and description.

Boils down to: "Use api_json format on exception responses for api_json resources" which I think is a duplicate of #3127428: HTTP 401 responses return HTML, not JSON:API error objects.