HomePhabricator
Diffusion Comm 692ce23ca3c7

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

Description

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

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

Reviewers: tomek, michal

Reviewed By: tomek

Subscribers: ashoat

Differential Revision: https://phab.comm.dev/D10395

Details

Provenance
kamilAuthored on Dec 19 2023, 12:04 AM
Reviewer
tomek
Differential Revision
D10395: [web] don't log out user when processing draft store ops fails
Parents
rCOMM1cadde3e5aa5: [commtest] Move backup client to shared
Branches
Unknown
Tags
Unknown