Symfony 2 error page response
问题 I have a SPA written in Angular used with a Symfony2 API. I want error responses like 500 to be retuned in json format rather than the HTML which according to the docs here is supported out the box. For error pages, it first looks for a template for the given format and status code (like error404.json.twig); I just cannot find anywhere that shows me how to explicitly specify that I want the json format. I thought having the request header 'Accept': 'application/json' was what it was talking