[🐴] Error recovery (#4036)

* Handle block state when sending messages

* Handle different pending failures

* Use existing profile data to handle blocks

* Better cleanup, leave room for more

* Attempt recover upon next send

* Reset pending failure

* Capture unexpected error

* Gracefully handle network errors and recovery

* Re-align error components and types

* Include history fetching in recoverable states
This commit is contained in:
Eric Bailey 2024-05-16 14:01:39 -05:00 committed by GitHub
parent dff6bd7c65
commit 4bceabc21c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 216 additions and 113 deletions

View file

@ -1,3 +1,7 @@
export const ACTIVE_POLL_INTERVAL = 1e3
export const BACKGROUND_POLL_INTERVAL = 5e3
export const INACTIVE_TIMEOUT = 60e3 * 5
export const NETWORK_FAILURE_STATUSES = [
1, 408, 425, 429, 500, 502, 503, 504, 522, 524,
]