Class: HTTPX::ErrorResponse
- Inherits:
-
Object
- Object
- HTTPX::ErrorResponse
- Includes:
- Loggable
- Defined in:
- lib/httpx/response.rb
Constant Summary
Constants included from Loggable
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Returns the value of attribute error.
Instance Method Summary collapse
-
#initialize(error, options) ⇒ ErrorResponse
constructor
A new instance of ErrorResponse.
- #raise_for_status ⇒ Object
- #status ⇒ Object
Methods included from Loggable
Constructor Details
#initialize(error, options) ⇒ ErrorResponse
Returns a new instance of ErrorResponse.
237 238 239 240 241 |
# File 'lib/httpx/response.rb', line 237 def initialize(error, ) @error = error @options = Options.new() log { "#{error.class}: #{error}" } end |
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error.
235 236 237 |
# File 'lib/httpx/response.rb', line 235 def error @error end |
Instance Method Details
#raise_for_status ⇒ Object
247 248 249 |
# File 'lib/httpx/response.rb', line 247 def raise_for_status raise @error end |
#status ⇒ Object
243 244 245 |
# File 'lib/httpx/response.rb', line 243 def status @error. end |