Closed (duplicate)
Project:
JSON:API
Version:
8.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Feb 2018 at 10:04 UTC
Updated:
13 Mar 2018 at 16:33 UTC
Jump to comment: Most recent
Discovered while working on #2930028: Comprehensive JSON API integration test coverage phase 1: for every entity type, individual resources only.
Like the REST module did before #2827084: EntityNormalizer::denormalize should not throw UnexpectedValueException, but \Symfony\Component\HttpKernel\Exception\UnprocessableEntityHttpException, so we get a 422 response instead of 400, the JSON API module sends a 422 response when either decoding or denormalizing fails. But that's wrong: it should be 400 for failed decoding, and 422 for failed denormalization. See #2827084.
Fix \Drupal\jsonapi\Controller\RequestHandler::deserializeBody().
None.
None.
None.
None.
Comments
Comment #2
wim leersComment #3
wim leersComment #4
wim leersPer #2883086-38: [PP-1] Port RequestHandler + ResourceResponseSubscriber improvements from REST module to JSON API and #2883086-39: [PP-1] Port RequestHandler + ResourceResponseSubscriber improvements from REST module to JSON API.2+4, this is being fixed there!
Comment #5
wim leers