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

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.