Class: NATS::JetStream::Error::ServiceUnavailable

Inherits:
APIError show all
Defined in:
lib/nats/io/js.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.



1092
1093
1094
1095
# File 'lib/nats/io/js.rb', line 1092

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