CodeforAustralia / school-finder

:eyes: Find schools by location
https://education.nsw.gov.au/school-finder
GNU General Public License v3.0
18 stars 7 forks source link

present geocoder errors in a modal #230

Closed techieshark closed 8 years ago

techieshark commented 8 years ago

Fixes #229

Rustuma commented 8 years ago

The modal pops up fine but it can also return an error for a legitimate address. eg 6 Warren Ball Ave works but 8 Warren Ball Ave doesn't (and 8 exists). what about this error msg:

"Sorry, Google geocoder gave an unexpected result. It said: "ZERO_RESULTS" when given address "24 Sophia Crescent, North Rocks, New South Wales, Australia". Either the address doesn't exist or the Google geocoder is experiencing problems. Feel free to try another search though!"

techieshark commented 8 years ago

Hmm.

There are a number of possible results in addition to "ZERO RESULTS":

image

So if we add the suggested text but got a different error it might look like we were blaming google when* it is our fault:

"Sorry, Google geocoder gave an unexpected result. It said: "OVER_QUERY_LIMIT" when given address "6 Warren Ball Avenue, Newtown, New South Wales, Australia". Either the address doesn't exist or the Google geocoder is experiencing problems. Feel free to try another search though!"

Thoughts?

techieshark commented 8 years ago

Maybe we just take out the second "Google" and it leaves enough ambiguity to solve that problem?

"Sorry, Google geocoder gave an unexpected result. It said: "OVER_QUERY_LIMIT" when given address "6 Warren Ball Avenue, Newtown, New South Wales, Australia". Either the address doesn't exist or the geocoder is experiencing problems. Feel free to try another search though!"

("the geocoder is experiencing problems" - could be either Google's geocoder or our geocoding code.)

Rustuma commented 8 years ago

Fair enough. Looking at the errors in the image above. Could we have reached some limit? How would we even know?

techieshark commented 8 years ago

@Rustuma those are just all the possible statuses that can currently be returned. We looked into this previously and decided for what we are doing it's impossible for a user to run up against those limits currently. I've changed as suggested above and re-pushed this branch, so check it out one more time and let me know what you think.