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
Is there a way to add full stack traces to the JSON response content for exceptions? I am using JMS Serializer and have played around with a few different options but I haven't found a reliable way that doesn't rely on the internal classes of FOSRestBundle but also maintains the status code and message mapping that is being performed in \FOS\RestBundle\Serializer\Normalizer\FlattenExceptionHandler.
The cleanest way to do this without changes to FlattenExceptionHandler would be to implement a JMS Serializer post_serializer event, but JMS Serializer doesn't fire the post_serializer event for custom handlers.
One option would be to add a new configuration option for this. Something like:
fos_rest:
exception:
show_trace: "%kernel.debug%"
This would be easy enough to implement in \FOS\RestBundle\Serializer\Normalizer\FlattenExceptionHandler and \FOS\RestBundle\Serializer\Normalizer\FlattenExceptionNormalizer.
Any assistance or thoughts would be greatly appreciated.
The text was updated successfully, but these errors were encountered:
Is there a way to add full stack traces to the JSON response content for exceptions? I am using JMS Serializer and have played around with a few different options but I haven't found a reliable way that doesn't rely on the internal classes of FOSRestBundle but also maintains the status code and message mapping that is being performed in
\FOS\RestBundle\Serializer\Normalizer\FlattenExceptionHandler
.The cleanest way to do this without changes to FlattenExceptionHandler would be to implement a JMS Serializer post_serializer event, but JMS Serializer doesn't fire the post_serializer event for custom handlers.
One option would be to add a new configuration option for this. Something like:
This would be easy enough to implement in
\FOS\RestBundle\Serializer\Normalizer\FlattenExceptionHandler
and\FOS\RestBundle\Serializer\Normalizer\FlattenExceptionNormalizer
.Any assistance or thoughts would be greatly appreciated.
The text was updated successfully, but these errors were encountered: