Customized exceptions returns jsons when raised