Interface IResponse
A response from OpenSearch
Inherited Members
Namespace: OpenSearch.Client
Assembly: OpenSearch.Client.dll
Syntax
public interface IResponse : IOpenSearchResponse
Properties
| Edit this page View SourceDebugInformation
A lazily computed, human readable string representation of what happened during a request for both successful and failed requests. Useful whilst developing or to log when IsValid is false on responses.
Declaration
[IgnoreDataMember]
string DebugInformation { get; }
Property Value
Type | Description |
---|---|
string |
IsValid
Checks if a response is functionally valid or not. This is a OpenSearch.Client abstraction to have a single property to check whether there was something wrong with a request.
For instance, an OpenSearch bulk response always returns 200 and individual bulk items may fail, IsValid will be false in that case.
You can also configure the client to always throw an OpenSearchClientException using ThrowExceptions if the response is not valid
Declaration
[IgnoreDataMember]
bool IsValid { get; }
Property Value
Type | Description |
---|---|
bool |
OriginalException
If the request resulted in an exception on the client side this will hold the exception that was thrown.
This property is a shortcut to ApiCall's OriginalException and is possibly set when IsValid is false depending on the cause of the error
You can also configure the client to always throw an OpenSearchClientException using ThrowExceptions if the response is not valid
Declaration
[IgnoreDataMember]
Exception OriginalException { get; }
Property Value
Type | Description |
---|---|
Exception |
ServerError
If the response results in an error on OpenSearch's side an
errorelement will be returned, this is mapped to ServerError in OpenSearch.Client.
Possibly set when IsValid is false, depending on the cause of the error
You can also configure the client to always throw an OpenSearchClientException using ThrowExceptions if the response is not valid
Declaration
[IgnoreDataMember]
ServerError ServerError { get; }
Property Value
Type | Description |
---|---|
ServerError |