Class ServerError
Namespace: OpenSearch.Net
Assembly: OpenSearch.Net.dll
Syntax
[DataContract]
public class ServerError
Constructors
|
Edit this page
View Source
ServerError()
Declaration
|
Edit this page
View Source
ServerError(Error, int?)
Declaration
public ServerError(Error error, int? statusCode)
Parameters
| Type |
Name |
Description |
| Error |
error |
|
| int? |
statusCode |
|
Properties
|
Edit this page
View Source
Error
Declaration
[DataMember(Name = "error")]
public Error Error { get; }
Property Value
|
Edit this page
View Source
Status
Declaration
[DataMember(Name = "status")]
public int Status { get; }
Property Value
Methods
|
Edit this page
View Source
Create(Stream, IOpenSearchSerializer)
Declaration
public static ServerError Create(Stream stream, IOpenSearchSerializer serializer = null)
Parameters
Returns
|
Edit this page
View Source
CreateAsync(Stream, CancellationToken, IOpenSearchSerializer)
Declaration
public static Task<ServerError> CreateAsync(Stream stream, CancellationToken token = default, IOpenSearchSerializer serializer = null)
Parameters
Returns
|
Edit this page
View Source
ToString()
Declaration
public override string ToString()
Returns
Overrides
|
Edit this page
View Source
TryCreate(Stream, out ServerError, IOpenSearchSerializer)
Declaration
public static bool TryCreate(Stream stream, out ServerError serverError, IOpenSearchSerializer serializer = null)
Parameters
| Type |
Name |
Description |
| Stream |
stream |
The response stream containing the server's error body.
|
| ServerError |
serverError |
The parsed error, or null if parsing failed.
|
| IOpenSearchSerializer |
serializer |
The serializer to deserialize with; defaults to the legacy Utf8Json LowLevelRequestResponseSerializer
when omitted. Callers with access to the request's configured serializer (e.g. a response's
ConnectionConfiguration) should pass it, so error parsing honors the same
engine as every other response type.
|
Returns
Extension Methods