FOSRestBundle
FOSRestBundle copied to clipboard
How to use custom jms form error handler
https://github.com/FriendsOfSymfony/FOSRestBundle/blob/e31339f04673e05a6a7c19ba6d8651d8673d5288/Serializer/Normalizer/FormErrorHandler.php#L30
Hi,
I want to customize jms form error handler to change json representation response. How can i do that when the construct parameter attempts JMSFormErrorHandler object ?
thanks for your response
Have you tried creating a jms handler to serialize your error as you wish?
The problem I see is that I can create a custom JMS FormErrorHandler but I need to to customize the general root level format of the error json. That is defined in \FOS\RestBundle\Serializer\Normalizer\FormErrorHandler::adaptFormArray
. Is this somehow possible after 2.4?
Maybe do another CompilerPass that undoes what's done in JMSFormErrorHandlerPass
...