lib/graticule/geocoder/geonames.rb in graticule-1.0.0.pre2 vs lib/graticule/geocoder/geonames.rb in graticule-2.0.0
- old
+ new
@@ -33,10 +33,10 @@
response.timezoneId
end
# Extracts and raises an error from +xml+, if any.
def check_error(response) #:nodoc:
- if response.status
+ if response && response.status
case response.status.value
when 14 then
raise Error, reponse.status.message
when 12 then
raise AddressError, reponse.status.message