3 ms·
Using the JS client directly isn't that easy, as you might have noticed. With the user that is saying the save fails quite often, that's likely to be using IE 9
by davidjgraph 14y ago
Using the JS client directly isn't that easy, as you might have noticed. With the user that is saying the save fails quite often, that's likely to be using IE 9, it seems to have a far worse fail rate than the other browsers.
If you haven't already, add an exponential backoff to the save, i.e. if it fails try again in 1 second, 2 seconds, 4 seconds, etc. Google recommend it here https://developers.google.com/drive/handle-errors#implementing_exponential_backoff https://developers.google.com/drive/handle-errors#implementi....
Also, if it's useful, we created a formal state machine for using the JS client library, the code is at https://github.com/jgraph/draw.io/blob/master/war/js/diagramly/GoogleDrive.js https://github.com/jgraph/draw.io/blob/master/war/js/diagram.... Turning it into a state machine helped visualize which error cases weren't being dealt with.
- gojko 14y agothanks. we do retry and backoff with S3 storage, google api seemed more reliable on Chrome. Nice lesson about not forgetting IE when testing :)