### Is there an existing issue for this?

- [X] I have searched the existing issues and read the documentation

### Question

After configuring it  withEnv("DYNAMODB_WRITE_ERROR_PROBABILITY", "1.0") — it is expected to throw dynamo throuput exception , but throwing 500 error - `(Service: DynamoDb, Status Code: 500, Request ID: null, Extended Request ID: null)","operationType":"PutItem","kinesisRecordMetaData":{"recordInsertionDate":"01-01-2021"}}, Response - PutObjectResponse(ETag="5435b0664a1337227d380fbd83ebcc89")

### Anything else?

_No response_
"""
    Get an OpenSearch cluster endpoint by describing the cluster associated with the domain_arn
    :param domain_arn: ARN of the cluster.
    :returns: cluster endpoint
    :raises: ValueError if the domain_arn is malformed
    """
    region_name = extract_region_from_arn(domain_arn)
    if region_name is None:
        raise ValueError("unable to parse region from opensearch domain ARN")
    opensearch_client = connect_to_service(service_name="opensearch", region_name=region_name)
    domain_name = domain_arn.rpartition("/")[2]
    info = opensearch_client.describe_domain(DomainName=domain_name)
    base_domain = info["DomainStatus"]["Endpoint"]
    endpoint = base_domain if base_domain.startswith("http") else f"https://{base_domain}"
    return endpoint
def get_search_db_connection(endpoint: str, region_name: str):
    """
    Get a connection to an ElasticSearch or OpenSearch DB
    :param endpoint: cluster endpoint
    :param region_name: cluster region e.g. us-east-1
    """
    from opensearchpy import OpenSearch, RequestsHttpConnection
    from requests_aws4auth import AWS4Auth
    verify_certs = False
    use_ssl = False
    
    if "https://" in endpoint:
        use_ssl = True