Exception: Stove::UploadError

Inherits:
Error
  • Object
show all
Defined in:
lib/stove/error.rb

Instance Method Summary collapse

Methods inherited from Error

set_exit_code

Constructor Details

#initialize(response) ⇒ UploadError

Returns a new instance of UploadError.



86
87
88
# File 'lib/stove/error.rb', line 86

def initialize(response)
  @response = response
end

Instance Method Details

#messageObject



90
91
92
93
94
95
# File 'lib/stove/error.rb', line 90

def message
  "The following errors occured when uploading:\n" <<
    (@response.parsed_response['error_messages'] || []).map do |error|
      "  - #{error}"
    end.join("\n")
end