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, Nov 20, 3:09 PM
Unknown Object (File)
Wed, Nov 20, 3:09 PM
Unknown Object (File)
Thu, Nov 7, 6:31 AM
Unknown Object (File)
Oct 22 2024, 9:19 AM
Unknown Object (File)
Oct 22 2024, 8:57 AM
Unknown Object (File)
Oct 22 2024, 5:32 AM
Unknown Object (File)
Oct 22 2024, 5:32 AM
Unknown Object (File)
Oct 6 2024, 10:06 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
Branch
improve-logging
Lint
No Lint Coverage
Unit
No Test Coverage

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

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

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