Dreaded Google Apps error: “We’re sorry, a server error occurred. Please wait a bit and try again.”

a-server-error-occurredPeople who use my Insert and Delete Cell Add-on for Google Sheets have been reporting this error.  I was unable to recreate the error until someone shared a spreadsheet with me and I found the culprit: merged cells.

What’s going on?

merged-cellsWhen you insert cells and shift the existing contents down, my Add-on selects the range of cells from your selection to the bottom of the sheet and moves it down.  But if there are merged cells below your selection, the new range doesn’t make sense and an error is generated.  The same thing happens if you try to delete and shift up, or if you try to shift left or right with merged cells to the right of your selection.

Why not catch the error and generate a friendly error message?

I’ve been trying, but this error isn’t triggering the try – catch section of my code.  There also isn’t a way to detect merged cells without trying some strange tricks that would take a lot more time than I have.  I’ve opened a bug report with Google about this.

This error seems to be Google’s version of “We’re not sure what happened, and hope that if the customer tries again it might go away”.

One thought on “Dreaded Google Apps error: “We’re sorry, a server error occurred. Please wait a bit and try again.”

Leave a Reply

Your email address will not be published. Required fields are marked *