tehhowch / apps-script

A collection of files used by Google Apps Script to develop and serve data via Google Sheets
0 stars 0 forks source link

Handle cases where a member has no scoreboard row #3

Closed tehhowch closed 7 years ago

tehhowch commented 7 years ago

When performing update fetches, information about crown changes and ranking are only available if the user was in the database prior to the most recent UpdateScoreboard call. Chaining UpdateScoreboard to a successful member add/delete is the simplest resolution, but may not be possible if the add/delete process takes too long.

Currently, UpdateDatabase will throw an error if this situation occurs, and identify the member in the error message.

tehhowch commented 7 years ago

While 5910710 should prevent any instances of members appearing in the call to getUserBatch and also not being present in the spreadsheet's snapshot, UpdateDatabase does not yet gracefully handle a missing member when performing its update.