You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Example
When trying to deserialize that data you'll see a 500 error because the type of property1 is string and you're passing a null value. In Symfony 5.4 we've improved this behavior thanks to the new COLLECT_DENORMALIZATION_ERRORS option.
If you pass that option, the PHP exception will include the detailed list of errors. Then you can process it like in the following example that handles some API:
Description
For Resources collect denormalization type errors in serializer and return them in http response as constraint violations. use Symfony 5.4 serializer's feature
https://symfony.com/blog/new-in-symfony-5-4-serializer-improvements#collect-denormalization-type-errors
Example
When trying to deserialize that data you'll see a 500 error because the type of property1 is string and you're passing a null value. In Symfony 5.4 we've improved this behavior thanks to the new COLLECT_DENORMALIZATION_ERRORS option.
If you pass that option, the PHP exception will include the detailed list of errors. Then you can process it like in the following example that handles some API:
The text was updated successfully, but these errors were encountered: