GeoNames Webservice Exception
If a request for a geonames web service encounters an error the following exception format will be used for the returned document. GeoNames supports two flavor of web services : JSON and XML. The exception message returned is either JSON or XML and consists of a status element with a numeric error code and a message string.
XML Exception
Example :
<geonames>
<status message="we are afraid we could not find a administrative country subdivision for latitude and longitude :51.03,-20.0" value="12"/>
</geonames>
JSON Exception
Example :
{"status": {
"message": "we are afraid we could not find a administrative country subdivision for latitude and longitude :51.03,-20.0",
"value": 15
}}
| Error Code | Description |
| 10 | Authorization Exception |
| 11 | record does not exist |
| 12 | other error |
| 13 | database timeout |
| 14 | invalid parameter |
| 15 | no result found |
| 16 | duplicate exception |
| 17 | postal code not found |
| 18 | daily limit of credits exceeded |
| 19 | hourly limit of credits exceeded |
| 20 | weekly limit of credits exceeded |
| 21 | invalid input |
| 22 | server overloaded exception |
| 23 | service not implemented |
| 24 | radius too large |
| 27 | maxRows too large |