Page MenuHomePhabricator

[web] don't log out user when processing draft store ops fails
ClosedPublic

Authored by kamil on Dec 19 2023, 12:05 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Sep 30, 1:58 AM
Unknown Object (File)
Sat, Sep 7, 9:55 AM
Unknown Object (File)
Sat, Sep 7, 9:26 AM
Unknown Object (File)
Sat, Sep 7, 9:26 AM
Unknown Object (File)
Sat, Sep 7, 9:26 AM
Unknown Object (File)
Fri, Sep 6, 10:30 PM
Unknown Object (File)
Sep 5 2024, 11:42 AM
Unknown Object (File)
Aug 30 2024, 1:06 AM
Subscribers

Details

Summary

Each time one character is typed operation with updated text is processed, so there is a high possibility that if something fails, those are draft operations.

When e.g. thread store operation fails we end with a corrupted state which could cause many issues, so it's safe to delete the database and log out the user.

When the draft operation fails at the worst case we lose the last character typed (if we stopped typing after that last character on which there was a failure), in other cases this does not influence app logic, so I think we can avoid logging to mitigate the user's frustration and at the same time keep alert with logging which could help debugging issues.

It will be better to make sure which operation exactly failed, but we wrap everything in one transaction so this doesn't make any change.

Test Plan

Throw when updating the draft and check if only the alert is shown without logging the user out

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.Dec 19 2023, 4:52 AM

I would guess that failing to process the reports also shouldn't cause clearing the db - if we fail the operation, we won't save a report, and by clearing the db we're making things a little worse.

This revision is now accepted and ready to land.Dec 19 2023, 6:21 AM
This revision was landed with ongoing or failed builds.Dec 19 2023, 9:07 AM
This revision was automatically updated to reflect the committed changes.