civicmapper / flush-it

See how far and where wastewater travels to the Allegheny County Sanitary Authority (ALCOSAN) treatement facility.
http://flush-it.civicmapper.com
MIT License
1 stars 4 forks source link

ArcGIS Server token request error handling with retry #31

Open gassc opened 3 years ago

gassc commented 3 years ago

Currently, if the application can't get a token from the ArcGIS Server endpoint (on ROK Tech), we only show a message to the effect of "couldn't get the token, sorry". It doesn't attempt to retry the request. image

Since the problem is fairly rare, a short term solution is in cfe8ef725ca65a931168aa6009755fc687f0b015, which advises the end-user to refresh the browser window. This almost always works.

The real solution of course is to attempt to retry acquiring that token using a randomized and exponential back-off and retry approach.