Closed udik-chudik closed 3 months ago
fetch and all other commands throw on IMAP response failures - these are errors you can recover from in the same IMAP session. For network etc failures that break the IMAP session, you need to set up the generic error handler, and when it fires, destroy the existing ImapFlow object and create and connect a new one.
There is an unexpected behavior during some kind of errors. This make the usage of such a beautiful lib unreliable
To Reproduce
The code from README: while fetching is in progress
and network error occurs (for example turn wifi off/on), the program crashes with
After adding a listener for an error event, for example:
crashes stopped. But none of
.catch
are fired:try
in 'main' neithermain().catch
.main().then
does not fires as well.Expected behavior Expect
to
throw
if a network error occurs.Additional context Node v20.14.0