def raise_for_status(response):
for err_name in web_exceptions.__all__:<EOL><INDENT>err = getattr(web_exceptions, err_name)<EOL>if err.status_code == response.status:<EOL><INDENT>payload = dict(<EOL>headers=response.headers,<EOL>reason=response.reason,<EOL>)<EOL>if issubclass(err, web_exceptions._HTTPMove):  <EOL><INDENT>raise err(response.headers['<STR_LIT>'], **payload)<EOL><DEDENT>raise err(**payload)<EOL><DEDENT><DEDENT>
Raise an appropriate error for a given response.

    Arguments:
      response (:py:class:`aiohttp.ClientResponse`): The API response.

    Raises:
      :py:class:`aiohttp.web_exceptions.HTTPException`: The appropriate
        error for the response's status.