[WO-563] Use global error handler in IMAP check