Exception: QcloudCos::Http::ResponseCodeError

Inherits:
Error
  • Object
show all
Defined in:
lib/qcloud_cos/http.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ ResponseCodeError

Returns a new instance of ResponseCodeError.



66
67
68
69
70
71
# File 'lib/qcloud_cos/http.rb', line 66

def initialize(response)
  @response = response
  @code = response.code.to_i
  @body = response.body
  super("Wrong response code with code=#{code} and body=#{body}")
end

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



65
66
67
# File 'lib/qcloud_cos/http.rb', line 65

def body
  @body
end

#codeObject

Returns the value of attribute code.



65
66
67
# File 'lib/qcloud_cos/http.rb', line 65

def code
  @code
end

#responseObject

Returns the value of attribute response.



65
66
67
# File 'lib/qcloud_cos/http.rb', line 65

def response
  @response
end