Exception: GoogleMaps::Services::Exceptions::HTTPError
- Inherits:
-
TransportError
- Object
- StandardError
- TransportError
- GoogleMaps::Services::Exceptions::HTTPError
- Defined in:
- lib/googlemaps/services/exceptions.rb
Overview
Represents an unexpected HTTP error.
Instance Attribute Summary collapse
-
#status_code ⇒ Symbol
Status_code The response status code.
Instance Method Summary collapse
-
#initialize(status_code) ⇒ HTTPError
constructor
A new instance of HTTPError.
-
#to_s ⇒ String
Returns the string representation of this error.
Constructor Details
#initialize(status_code) ⇒ HTTPError
Returns a new instance of HTTPError.
27 28 29 |
# File 'lib/googlemaps/services/exceptions.rb', line 27 def initialize(status_code) self.status_code = status_code end |
Instance Attribute Details
#status_code ⇒ Symbol
Returns status_code The response status code.
25 26 27 |
# File 'lib/googlemaps/services/exceptions.rb', line 25 def status_code @status_code end |
Instance Method Details
#to_s ⇒ String
Returns the string representation of this error.
34 35 36 |
# File 'lib/googlemaps/services/exceptions.rb', line 34 def to_s "HTTP Error: #{self.status_code}" end |