Class: NATS::JetStream::Error::APIError
- Inherits:
-
NATS::JetStream::Error
- Object
- Error
- NATS::JetStream::Error
- NATS::JetStream::Error::APIError
- Defined in:
- lib/nats/io/js.rb
Overview
When the server responds with an error from the JetStream API.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#err_code ⇒ Object
readonly
Returns the value of attribute err_code.
-
#seq ⇒ Object
readonly
Returns the value of attribute seq.
-
#stream ⇒ Object
readonly
Returns the value of attribute stream.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ APIError
constructor
A new instance of APIError.
- #to_s ⇒ Object
Constructor Details
#initialize(params = {}) ⇒ APIError
Returns a new instance of APIError.
1074 1075 1076 1077 1078 1079 1080 |
# File 'lib/nats/io/js.rb', line 1074 def initialize(params={}) @code = params[:code] @err_code = params[:err_code] @description = params[:description] @stream = params[:stream] @seq = params[:seq] end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
1072 1073 1074 |
# File 'lib/nats/io/js.rb', line 1072 def code @code end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
1072 1073 1074 |
# File 'lib/nats/io/js.rb', line 1072 def description @description end |
#err_code ⇒ Object (readonly)
Returns the value of attribute err_code.
1072 1073 1074 |
# File 'lib/nats/io/js.rb', line 1072 def err_code @err_code end |
#seq ⇒ Object (readonly)
Returns the value of attribute seq.
1072 1073 1074 |
# File 'lib/nats/io/js.rb', line 1072 def seq @seq end |
#stream ⇒ Object (readonly)
Returns the value of attribute stream.
1072 1073 1074 |
# File 'lib/nats/io/js.rb', line 1072 def stream @stream end |
Instance Method Details
#to_s ⇒ Object
1082 1083 1084 |
# File 'lib/nats/io/js.rb', line 1082 def to_s "#{@description} (status_code=#{@code}, err_code=#{@err_code})" end |