Exception: Tilia::Http::ClientHttpException
- Inherits:
-
HttpException
- Object
- Exception
- HttpException
- Tilia::Http::ClientHttpException
- Defined in:
- lib/tilia/http/client_http_exception.rb
Overview
This exception represents a HTTP error coming from the Client.
By default the Client will not emit these, this has to be explicitly enabled with the setThrowExceptions method.
Instance Attribute Summary collapse
-
#response ⇒ ResponseInterface
readonly
Returns the full response object.
Instance Method Summary collapse
-
#http_status ⇒ Object
The http status code for the error.
-
#initialize(response) ⇒ ClientHttpException
constructor
Constructor.
Constructor Details
#initialize(response) ⇒ ClientHttpException
Constructor
20 21 22 |
# File 'lib/tilia/http/client_http_exception.rb', line 20 def initialize(response) @response = response end |
Instance Attribute Details
#response ⇒ ResponseInterface
Returns the full response object.
13 14 15 |
# File 'lib/tilia/http/client_http_exception.rb', line 13 def response @response end |
Instance Method Details
#http_status ⇒ Object
The http status code for the error.
27 28 29 |
# File 'lib/tilia/http/client_http_exception.rb', line 27 def http_status @response.status end |