Exception: EcwidApi::ResponseError
- Defined in:
- lib/ecwid_api/error.rb
Instance Method Summary collapse
-
#initialize(response) ⇒ ResponseError
constructor
A new instance of ResponseError.
Constructor Details
#initialize(response) ⇒ ResponseError
Returns a new instance of ResponseError.
5 6 7 8 9 10 11 |
# File 'lib/ecwid_api/error.rb', line 5 def initialize(response) if response.respond_to?(:reason_phrase) super "#{response.reason_phrase} (#{response.status})\n#{response.body}" else super "The Ecwid API responded with an error (#{response.status})" end end |