Struct DataSourceStatus.ErrorInfo
A description of an error condition that the data source encountered.
Inherited Members
Namespace: LaunchDarkly.Sdk.Server.Interfaces
Assembly: LaunchDarkly.ServerSdk.dll
Syntax
public struct DataSourceStatus.ErrorInfo
Properties
| Edit this page View SourceFDv1Fallback
The error indicates to fall back to FDv1. (At the time of writing this, this was indicated via the x-ld-fd-fallback header, but this may change in the future. This is just info for posterity.)
Declaration
public bool FDv1Fallback { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Kind
An enumerated value representing the general category of the error.
Declaration
public DataSourceStatus.ErrorKind Kind { get; set; }
Property Value
| Type | Description |
|---|---|
| DataSourceStatus.ErrorKind |
Message
Any additional human-readable information relevant to the error.
Declaration
public string Message { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Remarks
The format of this message is subject to change and should not be relied on programmatically.
Recoverable
Whether the error is recoverable. Recoverable errors are those that can be retried, such as network errors. Unrecoverable errors are those that cannot be retried, such as invalid SDK key errors.
Declaration
public bool Recoverable { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
StatusCode
The HTTP status code if the error was ErrorResponse, or zero otherwise.
Declaration
public int StatusCode { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
Time
The date/time that the error occurred.
Declaration
public DateTime Time { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTime |
Methods
| Edit this page View SourceFromException(Exception, bool)
Constructs an instance based on an exception.
Declaration
public static DataSourceStatus.ErrorInfo FromException(Exception e, bool recoverable)
Parameters
| Type | Name | Description |
|---|---|---|
| Exception | e | the exception |
| bool | recoverable | whether the error is recoverable |
Returns
| Type | Description |
|---|---|
| DataSourceStatus.ErrorInfo | an ErrorInfo |
FromHttpError(int, bool)
Constructs an instance based on an HTTP error status.
Declaration
public static DataSourceStatus.ErrorInfo FromHttpError(int statusCode, bool recoverable)
Parameters
| Type | Name | Description |
|---|---|---|
| int | statusCode | the status code |
| bool | recoverable | whether the error is recoverable |
Returns
| Type | Description |
|---|---|
| DataSourceStatus.ErrorInfo | an ErrorInfo |
ToString()
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string |