Exception: Rubycent::ResponseError
- Defined in:
- lib/rubycent/errors/response_error.rb
Overview
Rubycent::ResponseError
Raised when response from Centrifugo contains any error as result of API command execution.
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(error_data) ⇒ ResponseError
constructor
A new instance of ResponseError.
Constructor Details
#initialize(error_data) ⇒ ResponseError
Returns a new instance of ResponseError.
11 12 13 14 15 |
# File 'lib/rubycent/errors/response_error.rb', line 11 def initialize(error_data) @message, @code = error_data.values_at('message', 'code') super(@message) end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
9 10 11 |
# File 'lib/rubycent/errors/response_error.rb', line 9 def code @code end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
9 10 11 |
# File 'lib/rubycent/errors/response_error.rb', line 9 def @message end |