Page MenuHomePhabricator

Replace throw with log and early return when trying to update thread that does exists in the database in response to rescind
ClosedPublic

Authored by marcin on Sep 27 2022, 6:38 AM.
Tags
None
Referenced Files
F3246555: D5238.diff
Fri, Nov 15, 12:38 AM
Unknown Object (File)
Tue, Nov 12, 1:37 AM
Unknown Object (File)
Mon, Nov 11, 4:38 AM
Unknown Object (File)
Sat, Nov 9, 7:39 PM
Unknown Object (File)
Sat, Nov 9, 7:39 PM
Unknown Object (File)
Sat, Nov 9, 7:39 PM
Unknown Object (File)
Sat, Nov 9, 7:35 PM
Unknown Object (File)
Thu, Nov 7, 8:06 AM

Details

Summary

This differential replaces throw with log and early return upon arrival of the rescind that contains threadID which does not exist in local db on device. Situation when such a rescind arrives is possible and is not considered a bug anywhere soe throwin an exception here is not appriate. This differential also solves crash described here: https://linear.app/comm/issue/ENG-1892/ios-145-crash

Test Plan

Reproduce the following scenarion twice - before and after applying this differential:

  1. User A creates a chat with User B
  2. User B opens the chat on web and marks the chat as read

We should expect that User B's mobile app will crash before this diff and just log information after applying this diff.

Diff Detail

Repository
rCOMM Comm
Branch
marcin/eng-1892
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

That makes sense. One scenario where it can happen is receiving a notification for a thread that was deleted just before the notif was delivered.

This revision is now accepted and ready to land.Sep 28 2022, 2:49 AM

Rebase master before landing