def get_error_response_summary_dict(response):
    """
    Returns a summary of an error raised from a failed HTTP request using the requests library

    Args:
        response (requests.models.Response): The requests library response object

    Returns:
        dict: A summary of the error response
    """
    # If the response is an HTML document, include the URL in the summary but not the raw HTML
    if "text/html" in response.headers.get("Content-Type", ""):
        summary_dict = {"content": "(HTML body ignored)"}
    else:
        summary_dict = {"content": response.text}
    return {"code": response.status_code, "url": response.url, **summary_dict}