Exception: GoogleGeocoding::Errors::ServiceError

Inherits:
BaseError
  • Object
show all
Defined in:
lib/google_geocoding/errors.rb,
lib/google_geocoding/errors.rb

Overview

Extend ServiceError to include factory method based on status codes.

Constant Summary collapse

ERRORS_MAPPING =
{
  500 => ServerError,
  601 => MissingQueryError,
  602 => UnknownAddressError,
  603 => UnknownAddressError,
  610 => BadKeyError,
  620 => TooManyQueriesError
}

Class Method Summary collapse

Class Method Details

.build(status) ⇒ Object



71
72
73
# File 'lib/google_geocoding/errors.rb', line 71

def self.build(status)
  ERRORS_MAPPING[status].new
end