Exception: OmniAI::HTTPError
Overview
An error that wraps an HTTP::Response for non-OK requests.
Direct Known Subclasses
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#initialize(response) ⇒ HTTPError
constructor
A new instance of HTTPError.
- #inspect ⇒ Object
Constructor Details
#initialize(response) ⇒ HTTPError
Returns a new instance of HTTPError.
24 25 26 27 28 |
# File 'lib/omniai.rb', line 24 def initialize(response) super("status=#{response.status} body=#{response.body}") @response = response end |
Instance Attribute Details
#response ⇒ HTTP::Response
21 22 23 |
# File 'lib/omniai.rb', line 21 def response @response end |
Instance Method Details
#inspect ⇒ Object
30 31 32 |
# File 'lib/omniai.rb', line 30 def inspect "#<#{self.class} status=#{@response.status} body=#{@response.body}>" end |