Class: LaunchDarkly::Interfaces::DataSource::ErrorInfo
- Inherits:
-
Object
- Object
- LaunchDarkly::Interfaces::DataSource::ErrorInfo
- Defined in:
- lib/ldclient-rb/interfaces.rb
Overview
A description of an error condition that the data source encountered.
Constant Summary collapse
- UNKNOWN =
An unexpected error, such as an uncaught exception, further described by #message.
:unknown
- NETWORK_ERROR =
An I/O error such as a dropped connection.
:network_error
- ERROR_RESPONSE =
The LaunchDarkly service returned an HTTP response with an error status, available with #status_code.
:error_response
- INVALID_DATA =
The SDK received malformed data from the LaunchDarkly service.
:invalid_data
- STORE_ERROR =
The data source itself is working, but when it tried to put an update into the data store, the data store failed (so the SDK may not have the latest data).
Data source implementations do not need to report this kind of error; it will be automatically reported by the SDK when exceptions are detected.
:store_error
Instance Attribute Summary collapse
-
#kind ⇒ Symbol
readonly
The general category of the error.
-
#message ⇒ String?
readonly
Message an error message if applicable, or nil.
-
#status_code ⇒ Integer
readonly
An HTTP status or zero.
-
#time ⇒ Time
readonly
Time the error timestamp.
Instance Method Summary collapse
-
#initialize(kind, status_code, message, time) ⇒ ErrorInfo
constructor
A new instance of ErrorInfo.
Constructor Details
#initialize(kind, status_code, message, time) ⇒ ErrorInfo
Returns a new instance of ErrorInfo.
783 784 785 786 787 788 |
# File 'lib/ldclient-rb/interfaces.rb', line 783 def initialize(kind, status_code, , time) @kind = kind @status_code = status_code @message = @time = time end |
Instance Attribute Details
#kind ⇒ Symbol (readonly)
Returns the general category of the error.
775 776 777 |
# File 'lib/ldclient-rb/interfaces.rb', line 775 def kind @kind end |
#message ⇒ String? (readonly)
Returns message an error message if applicable, or nil.
779 780 781 |
# File 'lib/ldclient-rb/interfaces.rb', line 779 def @message end |
#status_code ⇒ Integer (readonly)
Returns an HTTP status or zero.
777 778 779 |
# File 'lib/ldclient-rb/interfaces.rb', line 777 def status_code @status_code end |
#time ⇒ Time (readonly)
Returns time the error timestamp.
781 782 783 |
# File 'lib/ldclient-rb/interfaces.rb', line 781 def time @time end |