class_docstr: GeoNames REST Web Services
  ==========================
  GeoNames is mainly using REST webservices. Find nearby postal codes / reverse geocoding
  This service comes in two flavors.You can either pass the lat/long or a postalcode/placename.
  
  API Reference
  -------------
  http://www.geonames.org/export/web-services.html
class_docstr_tok: ["GeoNames","REST","Web","Services","==========================","GeoNames","is","mainly","using","REST","webservices",".","Find","nearby","postal","codes","\/","reverse","geocoding","This","service","comes","in","two","flavors.You","can","either","pass","the","lat\/long","or","a","postalcode\/placename",".","API","Reference","--","--","--","--","--","--","-","http",":","\/\/www.geonames.org\/export\/web-services.html"]
docstr: Changed: removed check on number of elements:
  - totalResultsCount not sytematically returned (e.g in hierarchy)
  - done in base.py
docstr_tok: ["Changed",":","removed","check","on","number","of","elements",":","-","totalResultsCount","not","sytematically","returned","(","e.g","in","hierarchy",")","-","done","in","base.py"]
code: def _catch_errors(self, json_response):
      """Changed: removed check on number of elements:
      - totalResultsCount not sytematically returned (e.g in hierarchy)
      - done in base.py
      """
      status = json_response.get("status")
      if status:
          message = status.get("message")
          value = status.get("value")
          custom_messages = {
              10: "Invalid credentials",
              18: "Do not use the demo account for your application",
          }
          self.error = custom_messages.get(value, message)
          LOGGER.error(
              "Error %s from JSON %s", self.error, json_response
          )
  
      return self.error
  
imports: from __future__ import absolute_import
  import json
  import logging
  from geocoder.base import MultipleResultsQuery, OneResult
  from geocoder.keys import geonames_username
  from geocoder.location import BBox
label_desc: Use image node_id 2 for calling the GeonamesQuery obj's underlying member method code with example usage: obj._catch_errors(json_response) and returns: self