Exception: Tilia::Http::ClientHttpException
- Inherits:
-
HttpException
- Object
- StandardError
- 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 ⇒ Fixnum
The http status code for the error.
-
#initialize(response) ⇒ ClientHttpException
constructor
Constructor.
Constructor Details
#initialize(response) ⇒ ClientHttpException
Constructor
11 12 13 |
# File 'lib/tilia/http/client_http_exception.rb', line 11 def initialize(response) @response = response end |
Instance Attribute Details
#response ⇒ ResponseInterface (readonly)
Returns the full response object.
25 26 27 |
# File 'lib/tilia/http/client_http_exception.rb', line 25 def response @response end |
Instance Method Details
#http_status ⇒ Fixnum
The http status code for the error.
18 19 20 |
# File 'lib/tilia/http/client_http_exception.rb', line 18 def http_status @response.status end |