18.07.2017 - Now what if you want to apply token based Symfony authentication and . $exception->getMessageData()) ); return new JsonResponse($data, .