I am recently trying to make an Android App, which uses Google Civic API to find the local officials based on the user input (a zip code). During testing, I found I randomly encounter Error 400: "Failed to parse address" when sending the query to API's endpoint.
I used the following format to do my query: https://www.googleapis.com/civicinfo/v2/representatives?key=MY_API_KEY&address=zip-code
And for example, if the zip code input is 90210, it will show the following error when I clicked the query address:
{ "error": { "code": 400, "message": "Failed to parse address", "errors": [ { "message": "Failed to parse address", "domain": "global", "reason": "parseError" } ] } }
Is anyone knows what happened and how to fix it?
Thanks in advance!