def METHOD_NAME(response):
    """Check for expected response status code."""
    if response.status_code in [200, 201, 202]:
        return
    elif response.status_code == 401:
        raise errors.AuthenticationError("Access unauthorized - update access token.")
    else:
        content = response.content.decode("utf-8") if response.content else ""
        message = f"Request failed with code {response.status_code}: {content}"
        raise errors.RequestError(message)