Exception: NATS::JetStream::Error::ServiceUnavailable

Inherits:
APIError show all
Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/nats-pure-2.2.1/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

Methods inherited from APIError

#to_s

Constructor Details

#initialize(params = {}) ⇒ ServiceUnavailable

Returns a new instance of ServiceUnavailable.



64
65
66
67
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/nats-pure-2.2.1/lib/nats/io/jetstream/errors.rb', line 64

def initialize(params={})
  super(params)
  @code ||= 503
end