Exception: HTTPX::HTTPError
- Defined in:
- lib/httpx/errors.rb,
sig/errors.rbs
Overview
The exception class for HTTP responses with 4xx or 5xx status.
Instance Attribute Summary collapse
-
#response ⇒ Response
readonly
The HTTPX::Response response object this exception refers to.
Instance Method Summary collapse
-
#status ⇒ Integer
The HTTP response status.
Instance Attribute Details
#response ⇒ Response (readonly)
The HTTPX::Response response object this exception refers to.
106 107 108 |
# File 'lib/httpx/errors.rb', line 106 def response @response end |
Instance Method Details
#status ⇒ Integer
The HTTP response status.
error.status #=> 404
117 118 119 |
# File 'lib/httpx/errors.rb', line 117 def status @response.status end |