Instead of displaying an error like the following to someone trying to edit an article, catch it and give a nicer explanation that makes sense:
Re-Publish: An error occurred: ScriptError: Exception: API call to docs.documents.get failed with error: Empty response
Suggestions welcome, but one idea (from me) is:
Re-Publish: Sorry, Google Docs seems to be having an issue at the moment. Try again in a few minutes. If this problem persists, contact #tech-support on tinynews.slack.com.
I'm happy to make the code change - some input on how best to convey something's gone wrong (that might not be in our control) would be great though!
Also, note: if possible we should catch types of error and display a message that makes sense for each. In the above example, catch an API error in Google Docs/Drive.
Another type of error we could handle better: the authorization issue (ScriptError: Authorization). As Tyler pointed out, that one isn’t about a Google Docs problem, that’s about the user being logged in incorrectly
Instead of displaying an error like the following to someone trying to edit an article, catch it and give a nicer explanation that makes sense:
Re-Publish: An error occurred: ScriptError: Exception: API call to docs.documents.get failed with error: Empty response
Suggestions welcome, but one idea (from me) is:
Re-Publish: Sorry, Google Docs seems to be having an issue at the moment. Try again in a few minutes. If this problem persists, contact #tech-support on tinynews.slack.com.
I'm happy to make the code change - some input on how best to convey something's gone wrong (that might not be in our control) would be great though!
Also, note: if possible we should catch types of error and display a message that makes sense for each. In the above example, catch an API error in Google Docs/Drive.
Another type of error we could handle better: the authorization issue (ScriptError: Authorization). As Tyler pointed out, that one isn’t about a Google Docs problem, that’s about the user being logged in incorrectly