Handling Errors with geo_id
Managing invalid geolocation IDs in API requests
When working with Shovels' API, proper handling of geo_id errors is essential for smooth application performance. If you provide an invalid geo_id when querying permits, you'll typically receive a 422 Unprocessable Entity response with the message: "Invalid geolocation ID value. Have you resolved your address into Shovels geolocation ID?" This indicates that the geo_id format is incorrect or hasn't been properly obtained through our address resolution endpoint. However, it's important to note that if the format of the geo_id is technically valid but doesn't correspond to any known address or permit in our system, you won't receive an error. Instead, the response will contain no results (an empty items array with a 200 OK status). To avoid these issues, always begin your workflow by resolving addresses through our Address Search API before attempting to query permits with the resulting geo_id. Implementing proper error handling in your application for both 422 responses and empty result sets will improve user experience and help troubleshoot integration issues.