Re: Throwing error should output JSON

2013-08-28 Thread David Suna
Replying to myself - this is what I found. The presentation that I saw that said that putting error400.ctp in a json folder under /app/View/Errors would work automatically seems to be incorrect. The solution I came up with included the following steps: 1. Set a flag in app/Controller/AppControl

Throwing error should output JSON

2013-08-28 Thread David Suna
I am developing a REST API using the latest CakePHP. I was under the impression (from a presentation I watched on YouTube from CakeFest 2010) that I could throw an error and have it return the error as JSON to the client by adding a json direction below /app/View/Errors and adding the appropri