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
55 56 57 |
# File 'lib/rets4r/client/exceptions.rb', line 55 def initialize(http_response) self.http_response = http_response end |
Instance Attribute Details
#http_response ⇒ Object
Returns the value of attribute http_response.
52 53 54 |
# File 'lib/rets4r/client/exceptions.rb', line 52 def http_response @http_response end |
Instance Method Details
#code ⇒ Object
Shorthand for calling HTTPResponse#code
60 61 62 |
# File 'lib/rets4r/client/exceptions.rb', line 60 def code http_response.code end |
#message ⇒ Object
Shorthand for calling HTTPResponse#message
65 66 67 |
# File 'lib/rets4r/client/exceptions.rb', line 65 def http_response. end |
#rets_message ⇒ Object
Returns the RETS specification message for the HTTP response code
70 71 72 |
# File 'lib/rets4r/client/exceptions.rb', line 70 def Client::RETS_HTTP_MESSAGES[code] end |
#to_s ⇒ Object
74 75 76 |
# File 'lib/rets4r/client/exceptions.rb', line 74 def to_s "#{code} #{message}: #{rets_message}" end |