Exception: DomoscioRails::ResponseError
- Defined in:
- lib/domoscio_rails/errors.rb
Overview
Error Message from AdaptiveEngine
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#details ⇒ Object
readonly
Returns the value of attribute details.
-
#request_params ⇒ Object
readonly
Returns the value of attribute request_params.
-
#request_url ⇒ Object
readonly
Returns the value of attribute request_url.
Instance Method Summary collapse
-
#initialize(request_url, code, details = {}, body = nil, request_params = {}) ⇒ ResponseError
constructor
A new instance of ResponseError.
- #message ⇒ Object
Constructor Details
#initialize(request_url, code, details = {}, body = nil, request_params = {}) ⇒ ResponseError
Returns a new instance of ResponseError.
10 11 12 13 14 15 16 17 |
# File 'lib/domoscio_rails/errors.rb', line 10 def initialize(request_url, code, details = {}, body = nil, request_params = {}) @request_url = request_url @code = code @details = details @body = body @request_params = request_params super() if end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
8 9 10 |
# File 'lib/domoscio_rails/errors.rb', line 8 def body @body end |
#code ⇒ Object (readonly)
Returns the value of attribute code.
8 9 10 |
# File 'lib/domoscio_rails/errors.rb', line 8 def code @code end |
#details ⇒ Object (readonly)
Returns the value of attribute details.
8 9 10 |
# File 'lib/domoscio_rails/errors.rb', line 8 def details @details end |
#request_params ⇒ Object (readonly)
Returns the value of attribute request_params.
8 9 10 |
# File 'lib/domoscio_rails/errors.rb', line 8 def request_params @request_params end |
#request_url ⇒ Object (readonly)
Returns the value of attribute request_url.
8 9 10 |
# File 'lib/domoscio_rails/errors.rb', line 8 def request_url @request_url end |
Instance Method Details
#message ⇒ Object
19 20 21 |
# File 'lib/domoscio_rails/errors.rb', line 19 def @details.is_a?(Hash) && @details[:error].is_a?(Hash) ? @details.dig(:error, :message) : @details end |