core icon indicating copy to clipboard operation
core copied to clipboard

API platform seems to be not using/throwing away framework.serializer.default_context configuration

Open ostrolucky opened this issue 1 year ago • 0 comments

API Platform version(s) affected: 3.2.18

Description
If you have seld/jsonlint installed, since https://symfony.com/blog/new-in-symfony-6-4-serializer-improvements#detailed-json-decoding-errors in dev mode symfony serializer is supposed show something more useful than "Syntax error"

This can also be enabled in production by using this config:

framework:
 serializer:
  default_context:
   php/const Symfony\Component\Serializer\Encoder\JsonDecode::DETAILED_ERROR_MESSAGES: true

Neither works with APIP, however.

How to reproduce
Install seld/jsonlint and send payload to APIP endpoint that's not a valid JSON

ostrolucky avatar Apr 03 '24 11:04 ostrolucky