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
Unknown Object (File)
Sun, May 5, 9:49 PM
Unknown Object (File)
Sat, Apr 20, 8:59 PM
Unknown Object (File)
Sat, Apr 20, 8:59 PM
Unknown Object (File)
Sat, Apr 20, 8:59 PM
Unknown Object (File)
Sat, Apr 20, 8:59 PM
Unknown Object (File)
Sat, Apr 20, 8:57 PM
Unknown Object (File)
Apr 7 2024, 5:12 AM
Unknown Object (File)
Apr 3 2024, 9:56 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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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