Exception: ABBYY::Cloud::ResponseError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/abbyy/cloud/exceptions/response_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#dataObject (readonly)

Returns the value of attribute data.



5
6
7
# File 'lib/abbyy/cloud/exceptions/response_error.rb', line 5

def data
  @data
end

#statusObject (readonly)

Returns the value of attribute status.



5
6
7
# File 'lib/abbyy/cloud/exceptions/response_error.rb', line 5

def status
  @status
end