Method: QcloudCos::RequestError#initialize
- Defined in:
- lib/qcloud_cos/error.rb
permalink #initialize(response) ⇒ RequestError
Returns a new instance of RequestError.
10 11 12 13 14 15 16 17 |
# File 'lib/qcloud_cos/error.rb', line 10 def initialize(response) if response.parsed_response.key?('code') @code = response.parsed_response['code'] @message = response.parsed_response['message'] end @origin_response = response super("API ERROR Code=#{@code}, Message=#{@message}") end |