Check the response code