lib/osm/api.rb in osm-1.2.10 vs lib/osm/api.rb in osm-1.2.11
- old
+ new
@@ -262,9 +262,10 @@
# @param data what OSM gave us
# @return false if no error message was found
# @return [String] the error message
def self.get_osm_error(data)
return false unless data.is_a?(Hash)
+ return false if data['ok']
to_return = data['error'] || data['err'] || false
to_return = false if to_return.blank?
return to_return
end