fix issue with not json response

fix issue if the response is not a json object