Exception: NATS::JetStream::Error::ServiceUnavailable
- Inherits:
-
APIError
- Object
- StandardError
- IO::Error
- NATS::JetStream::Error
- APIError
- NATS::JetStream::Error::ServiceUnavailable
- Defined in:
- lib/nats/io/jetstream/errors.rb
Overview
When JetStream is not currently available, this could be due to JetStream not being enabled or temporarily unavailable due to a leader election when running in cluster mode. This condition is represented with a message that has 503 status code header.
Instance Attribute Summary
Attributes inherited from APIError
#code, #description, #err_code, #seq, #stream
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ ServiceUnavailable
constructor
A new instance of ServiceUnavailable.
Methods inherited from APIError
Constructor Details
#initialize(params = {}) ⇒ ServiceUnavailable
Returns a new instance of ServiceUnavailable.
64 65 66 67 |
# File 'lib/nats/io/jetstream/errors.rb', line 64 def initialize(params={}) super(params) @code ||= 503 end |