How to change default error behaviour of cakephp if any error occurred


this error occurred when controller or method not found and it come this default template but i want this error in json format like {status:404,message:‘controller not found’} whatever error return by application but response always should be come in json format… please guys help if you can

Please don’t re-submit questions you already posted beforehand.
There is already Cakephp default error response but i need to json format error response ongoing.