xmtp / libxmtp

MIT License
33 stars 13 forks source link

Improve error handling #871

Closed neekolas closed 6 days ago

neekolas commented 1 week ago

tl;dr

Notes

This is causing even more database locking errors, but that's a lot better than having read/write/delete operations failing silently. I had to add more retries to the default error handler to make this work, which is bad. Exponential backoff would be better than just hammering the db repeatedly.

The end goal of this is to better handle errors in process_for_id when syncing messages. If you have a bad message that fails, we don't really know whether to retry it or roll back the commit and move on to the next message in the queue.