lib/terminal/errors.rb in cc-terminal-0.1.0 vs lib/terminal/errors.rb in cc-terminal-0.1.1
- old
+ new
@@ -2,12 +2,13 @@
class APITimeoutError < StandardError; end
class APIConfigurationError < StandardError; end
class APIResponseError < StandardError
- attr_reader :message
+ attr_reader :message, :response
def initialize(response)
- @message = response.body.nil? ? '' : response.body['error']
+ @response = response
+ @message = @response.body.nil? ? '' : @response.body['error']
super(message)
end
end
end
\ No newline at end of file