adding so that the console displays the json_result if there is an error.