Exception: Qiniu::UploadFailedError

Inherits:
Exception
  • Object
show all
Defined in:
lib/qiniu/exceptions.rb

Instance Method Summary collapse

Constructor Details

#initialize(status_code, response_data) ⇒ UploadFailedError

Returns a new instance of UploadFailedError.



40
41
42
43
44
# File 'lib/qiniu/exceptions.rb', line 40

def initialize(status_code, response_data)
  data_string = response_data.map { |key, value| %Q(:#{key.to_s} => #{value.to_s}) }
  msg = %Q(Uploading Failed. HTTP Status Code: #{status_code}. HTTP response body: #{data_string.join(', ')}.)
  super(msg)
end