Page MenuHomePhabricator

[web] catch error while processing store operations
ClosedPublic

Authored by kamil on Dec 4 2023, 6:31 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 25, 6:48 AM
Unknown Object (File)
Fri, Nov 29, 2:35 AM
Unknown Object (File)
Fri, Nov 29, 12:52 AM
Unknown Object (File)
Nov 25 2024, 4:45 PM
Unknown Object (File)
Nov 20 2024, 3:09 PM
Unknown Object (File)
Nov 20 2024, 3:09 PM
Unknown Object (File)
Nov 7 2024, 6:31 AM
Unknown Object (File)
Oct 22 2024, 9:19 AM
Subscribers

Details

Summary

This is an improvement to ENG-5910.

Previously only on the worker console was some indication that processing store ops failed.
Adding an alert for staff users to know if ENG-5910 is caused by this.

Also, matching native, where when there are ops failures we close the app and then delete the database. Here we delete the database and reload app to show login screen for user.

Test Plan

Make operation with updating draft to throw and see video:

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kamil held this revision as a draft.
kamil edited the test plan for this revision. (Show Details)
kamil published this revision for review.Dec 4 2023, 7:03 AM
tomek added inline comments.
web/database/utils/store.js
85 ↗(On Diff #34182)

It might be a good idea to hide this behind isStaff check

This revision is now accepted and ready to land.Dec 4 2023, 8:04 AM
web/database/utils/store.js
85 ↗(On Diff #34182)

canUseDatabase is result of isStaff check

This diff is not very useful because the logs won't appear for the crash. These logs appear in the session preceding the crash, which causes the crash. But nobody will know to check the logs, because they won't see any issues. After refreshing, they will see issues, but there will be nothing in the logs.

EDIT

@kamil pointed out that there is an alert here, that would likely catch the user's attention