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.
228 229 230 231 232 |
# File 'lib/httpx/response.rb', line 228 def initialize(error, ) @error = error = Options.new() log { "#{error.class}: #{error}" } end |
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error.
226 227 228 |
# File 'lib/httpx/response.rb', line 226 def error @error end |
Instance Method Details
#raise_for_status ⇒ Object
238 239 240 |
# File 'lib/httpx/response.rb', line 238 def raise_for_status raise @error end |
#status ⇒ Object
234 235 236 |
# File 'lib/httpx/response.rb', line 234 def status @error. end |