how to get error message from json response