Exception: ABBYY::Cloud::ResponseError
- Inherits:
-
StandardError
- Object
- StandardError
- ABBYY::Cloud::ResponseError
- Defined in:
- lib/abbyy/cloud/exceptions/response_error.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(response) ⇒ ResponseError
constructor
A new instance of ResponseError.
Constructor Details
#initialize(response) ⇒ ResponseError
Returns a new instance of ResponseError.
7 8 9 10 11 |
# File 'lib/abbyy/cloud/exceptions/response_error.rb', line 7 def initialize(response) @status = response.code.to_i @data = Models::Error[parse_response(response)] unless @status == 500 super end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
5 6 7 |
# File 'lib/abbyy/cloud/exceptions/response_error.rb', line 5 def data @data end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
5 6 7 |
# File 'lib/abbyy/cloud/exceptions/response_error.rb', line 5 def status @status end |