open-austin / voteatx-app

Voting place finder application for Travis County, TX
http://voteatx.us/
Other
4 stars 2 forks source link

App hangs when service doesn't respond #3

Closed avickers closed 10 years ago

avickers commented 10 years ago

Presently, the app hangs with the spinner going indefinitely, if the service fails to respond. Instead, there should be a timeout and an alert that the service is down temporarily, please try again.

This is related to the service issue of the service not responding when an address outside of Texas is used.

avickers commented 10 years ago

The service was actually completing a successful callback with empty data, and this was raising an undefined error causing the script to abort.

I switched to a check for an undefined precinct, which now triggers to outside of Travis County alert. This implementation will work, unless we want the service to dictate warning messages.