composablesys / collabs

Collabs library monorepo
https://collabs.readthedocs.io/
Apache License 2.0
246 stars 11 forks source link

Handle errors in receive methods #258

Open mweidner037 opened 1 year ago

mweidner037 commented 1 year ago

Due to custom Collab implementations and https://github.com/composablesys/collabs/issues/257, we should occasional errors in Collab.receive methods.

Currently, these will propagate up the stack and the leave the app in an inconsistent and possibly stuck state. This behavior is okay for local operations (crash the app without affecting any collaborators), but probably not when receiving remote messages - a single bad message could make a doc unusable.

It would be nice to find a better way to handle these errors. In particular, we could ensure that all parts of a transaction that don't cause an error go through normally, including the vector clock update and messages for other CRDTs.