Class: LaunchDarkly::Interfaces::DataSource::ErrorInfo
- Inherits:
-
Object
- Object
- LaunchDarkly::Interfaces::DataSource::ErrorInfo
- Defined in:
- lib/ldclient-rb/interfaces/data_source.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.
256 257 258 259 260 261 |
# File 'lib/ldclient-rb/interfaces/data_source.rb', line 256 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.
248 249 250 |
# File 'lib/ldclient-rb/interfaces/data_source.rb', line 248 def kind @kind end |
#message ⇒ String? (readonly)
Returns message an error message if applicable, or nil.
252 253 254 |
# File 'lib/ldclient-rb/interfaces/data_source.rb', line 252 def @message end |
#status_code ⇒ Integer (readonly)
Returns an HTTP status or zero.
250 251 252 |
# File 'lib/ldclient-rb/interfaces/data_source.rb', line 250 def status_code @status_code end |
#time ⇒ Time (readonly)
Returns time the error timestamp.
254 255 256 |
# File 'lib/ldclient-rb/interfaces/data_source.rb', line 254 def time @time end |