Table of Contents

Class ElasticsearchDeleteException

Namespace
Excalibur.Data.ElasticSearch.Exceptions
Assembly
Excalibur.Data.ElasticSearch.dll

Represents an exception thrown when an attempt to delete a document from Elasticsearch fails.

public sealed class ElasticsearchDeleteException : ApiException, ISerializable
Inheritance
ElasticsearchDeleteException
Implements
Inherited Members

Remarks

This exception is designed to capture relevant information about the failed operation, including the document ID, document type, and API call details, to aid in diagnosing the failure.

Constructors

ElasticsearchDeleteException()

Initializes a new instance of the ApiException class with a default error message.

public ElasticsearchDeleteException()

ElasticsearchDeleteException(int, string?, Exception?)

Initializes a new instance of the ApiException class with a specified status code, error message, and inner exception.

public ElasticsearchDeleteException(int statusCode, string? message, Exception? innerException)

Parameters

statusCode int

The HTTP status code associated with the exception.

message string

The error message describing the exception. If null, a default message is used.

innerException Exception

The exception that caused the current exception.

Exceptions

ArgumentOutOfRangeException

Thrown if the statusCode is outside the valid range (100-599).

ElasticsearchDeleteException(string)

Initializes a new instance of the ApiException class with a specified error message.

public ElasticsearchDeleteException(string message)

Parameters

message string

The error message describing the exception.

ElasticsearchDeleteException(string, Exception?)

Initializes a new instance of the ApiException class with a specified error message and an inner exception that caused this exception.

public ElasticsearchDeleteException(string message, Exception? innerException)

Parameters

message string

The error message describing the exception.

innerException Exception

The exception that caused the current exception.

ElasticsearchDeleteException(string, Type?, string, Exception?)

Initializes a new instance of the ElasticsearchDeleteException class with the specified details.

public ElasticsearchDeleteException(string documentId, Type? documentType, string apiCallDetails, Exception? innerException = null)

Parameters

documentId string

The ID of the document that could not be deleted.

documentType Type

The type of the document that could not be deleted.

apiCallDetails string

Details of the API call that failed.

innerException Exception

The inner exception that caused this exception, if any.

Exceptions

ArgumentException

Thrown if documentId or apiCallDetails is null, empty, or whitespace.

Properties

ApiCallDetails

Gets details of the API call that failed.

public string ApiCallDetails { get; }

Property Value

string

Details of the API call that failed.

DocumentId

Gets the ID of the document that could not be deleted.

public string DocumentId { get; }

Property Value

string

The ID of the document that could not be deleted.

DocumentType

Gets the type of the document that could not be deleted.

public Type? DocumentType { get; }

Property Value

Type

The type of the document that could not be deleted.