Handle error after parsing the body of the response.