[FLOW3-general] How can i catch TYPO3\FLOW3\Persistence\Exception\ObjectValidationFailedException in controllerAction

Kerstin Huppenbauer kerstin.huppenbauer at die-digiparden.de
Sat May 5 14:43:31 CEST 2012


Hi Pankaj,

have a look at the error section in settings.yaml
here you can define your own exception handler which
responses the JSON you like.

cheers Kerstin

>
> Yes this is the right approach, but in case of RestController actions if
> the validation fails you get a long exception back-trace as REST API
> response and no real JSON output. So how to solve this and let it send
> simple JSON response like {"success":false,"message":"propertyX was
> required"} ? Probably using the JsonView and/or the proper @format .json
> approach?
>
>
> Thanks in advance!
>



More information about the FLOW3-general mailing list