Catch PUT Errors

If something goes wrong on the server, save the work locally, if nothing else. A border turning yellow is at least some kind of warning.


We've seen errors due to rapid split/join updates overrunning the server. A weakness in our synchronization, for sure.

We've seen errors with persona where the client thinks the user is still logged in but the server does not and rejects updates from the client. I've written whole web pages only to notice eventually that there is nothing in the journal.

Aside: I've saved a whole page that failed to store by copying the text from the screen, logging in, then pasting the text and splitting it into paragraphs.

There was a time where server errors produced a red banner that could only be removed from the top of the screen by refreshing the browser. People didn't know to ignore them and just do the refresh which tended to fix everything. Now we silently compound the problems.


We should also fix the root causes, but here we are thinking about a general problem. Imagine simply loosing the connection to the server on a flaky wifi.

✔ The error is noticed in lib/pageHandler. The local storage code is in there too. The error handler simply calls the local storage code as if that were the intention initially.

✔ Make sure the local storage code writes properly from this alternate path in.

✔ Make sure one can 'fork' back to origin once the server-side problem has been corrected.

Make sure ongoing editing of the local-storage copy is applied and journaled correctly.