Exception: Algolia::AlgoliaUnreachableHostError
- Inherits:
-
AlgoliaError
- Object
- StandardError
- AlgoliaError
- Algolia::AlgoliaUnreachableHostError
- Defined in:
- lib/algolia/error.rb
Overview
Used when hosts are unreachable
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Instance Method Summary collapse
-
#initialize(message, errors = []) ⇒ AlgoliaUnreachableHostError
constructor
A new instance of AlgoliaUnreachableHostError.
Constructor Details
#initialize(message, errors = []) ⇒ AlgoliaUnreachableHostError
Returns a new instance of AlgoliaUnreachableHostError.
15 16 17 18 19 20 21 22 |
# File 'lib/algolia/error.rb', line 15 def initialize(, errors = []) errors.last&.tap do |last_error| += " Last error for #{last_error[:host]}: #{last_error[:error]}" end super() @errors = errors end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
13 14 15 |
# File 'lib/algolia/error.rb', line 13 def errors @errors end |