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

    This function checks if the exception is of a type that should cause the request to be retried,
    based on the status code or the type of exception.

    Args:
        e (ExtendedRequestException): The exception raised during the request.

    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.

    This function checks if the exception is of a type that should cause the request to be retried,
    based on the status code or the type of exception.

    Args:
        e (ExtendedRequestException): The exception raised during the request.

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

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