Exception: RETS4R::Client::HTTPError
- Inherits:
-
ClientException
- Object
- Exception
- ClientException
- RETS4R::Client::HTTPError
- Defined in:
- lib/rets4r/client/exceptions.rb
Overview
The HTTP response returned by the server indicates that there was an error processing the request and the client cannot continue on its own without intervention.
Instance Attribute Summary collapse
-
#http_response ⇒ Object
Returns the value of attribute http_response.
Instance Method Summary collapse
-
#code ⇒ Object
Shorthand for calling HTTPResponse#code.
-
#initialize(http_response) ⇒ HTTPError
constructor
Takes a HTTPResponse object.
-
#message ⇒ Object
Shorthand for calling HTTPResponse#message.
-
#rets_message ⇒ Object
Returns the RETS specification message for the HTTP response code.
- #to_s ⇒ Object
Constructor Details
#initialize(http_response) ⇒ HTTPError
Takes a HTTPResponse object
22 23 24 |
# File 'lib/rets4r/client/exceptions.rb', line 22 def initialize(http_response) self.http_response = http_response end |
Instance Attribute Details
#http_response ⇒ Object
Returns the value of attribute http_response.
19 20 21 |
# File 'lib/rets4r/client/exceptions.rb', line 19 def http_response @http_response end |
Instance Method Details
#code ⇒ Object
Shorthand for calling HTTPResponse#code
27 28 29 |
# File 'lib/rets4r/client/exceptions.rb', line 27 def code http_response.code end |
#message ⇒ Object
Shorthand for calling HTTPResponse#message
32 33 34 |
# File 'lib/rets4r/client/exceptions.rb', line 32 def http_response. end |
#rets_message ⇒ Object
Returns the RETS specification message for the HTTP response code
37 38 39 |
# File 'lib/rets4r/client/exceptions.rb', line 37 def Client::RETS_HTTP_MESSAGES[code] end |
#to_s ⇒ Object
41 42 43 |
# File 'lib/rets4r/client/exceptions.rb', line 41 def to_s "#{code} #{}: #{}" end |