Class ErrorCode
Describes an error received from the server including name, description and retry stratergy.
Inherited Members
Namespace: Couchbase.Core.IO.Operations.Errors
Assembly: Couchbase.NetClient.dll
Syntax
public class ErrorCode
Constructors
| Edit this page View SourceErrorCode()
Declaration
public ErrorCode()
Properties
| Edit this page View SourceAttrs
Gets or sets the list of attribures for the error.
Declaration
[JsonPropertyName("attrs")]
public IEnumerable<string> Attrs { get; set; }
Property Value
Type | Description |
---|---|
IEnumerable<string> |
Desc
Gets or sets the description of the error.
Declaration
[JsonPropertyName("desc")]
public string Desc { get; set; }
Property Value
Type | Description |
---|---|
string |
Name
Gets or sets the name of the error.
Declaration
[JsonPropertyName("name")]
public string Name { get; set; }
Property Value
Type | Description |
---|---|
string |
Retry
Gets or sets the RetrySpec for the error.
Declaration
[JsonPropertyName("retry")]
public RetrySpec Retry { get; set; }
Property Value
Type | Description |
---|---|
RetrySpec |
Methods
| Edit this page View SourceGetNextInterval(uint, int)
Gets the next interval.
Declaration
public int GetNextInterval(uint attempts, int defaultTimeout)
Parameters
Type | Name | Description |
---|---|---|
uint | attempts | The number of attempts. |
int | defaultTimeout | The default timeout. |
Returns
Type | Description |
---|---|
int | The next interval in ms. |
HasTimedOut(double)
Determines whether if the error has timed out based on it's retry strategy.
Declaration
public bool HasTimedOut(double duration)
Parameters
Type | Name | Description |
---|---|---|
double | duration | The amount of time already expired. |
Returns
Type | Description |
---|---|
bool | True if the retry strategy has timed out, otherwise false. |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string |