/** * Turning IMAP protocol failures into messages a caller can act on. */ /** * Run an IMAP command, replacing ImapFlow's generic failure with what the * server actually said. * * On a tagged NO/BAD response ImapFlow throws `Error('Command failed')` and * puts the raw server line on `.response`. So a refusal the server explained * precisely — `NO invalid mailbox name ["X"]: operation not allowed` — reaches * the user as "Command failed", which says nothing about what to do next. * * Errors carrying no server response, such as a socket reset, are passed * through untouched: rewriting those would obscure the real cause. * * @param operation what was being attempted, phrased for a human * @param run the ImapFlow call */ export declare function imapCommand(operation: string, run: () => Promise): Promise; //# sourceMappingURL=imap-error.d.ts.map