def _should_retry_exception(e: ExtendedRequestException) -> bool:
    """
    Determine whether the exception should trigger a retry.

    Args:
        e (ExtendedRequestException): The exception raised.

    Returns:
        bool: True if the exception should trigger a retry, False otherwise.

    """
    original_exception = e.original_exception if hasattr(e, "original_exception") else e
    if isinstance(original_exception, httpx.HTTPStatusError):
        return original_exception.response.status_code in STATUS_FORCE_LIST
    elif isinstance(original_exception, httpx.RequestError):
        return True
    return False

    Determine whether the exception should trigger a retry.

    Args:
        e (ExtendedRequestException): The exception raised.

    Returns:
        bool: True if the exception should trigger a retry, False otherwise.

    
llama-index-integrations/llms/llama-index-llms-oci-data-science/llama_index/llms/oci_data_science/client.py