IMAP Fixes & Improvements (#13582)
- Removed caching of IMAP client as it was problematic and didn't really matter because of our pipeline, also added retry logic to client. - Some code refactoring and cleanup - Breaking changes: - Removed messageChannel.syncCursor - Uses messageFolder.syncCursor instead - Removed Date based sync cursor in favor of message UID which is much more reliable and precise --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
+4
-6
@@ -20,6 +20,7 @@ import {
|
||||
connectionImapSmtpCalDav,
|
||||
isProtocolConfigured,
|
||||
} from '@/settings/accounts/validation-schemas/connectionImapSmtpCalDav';
|
||||
import { ApolloError } from '@apollo/client';
|
||||
import { isDefined } from 'twenty-shared/utils';
|
||||
import {
|
||||
ConnectedImapSmtpCaldavAccount,
|
||||
@@ -149,12 +150,9 @@ export const useImapSmtpCaldavConnectionForm = ({
|
||||
enqueueSuccessSnackBar({ message: successMessage });
|
||||
navigate(SettingsPath.Accounts);
|
||||
} catch (error) {
|
||||
const errorMessage =
|
||||
error instanceof Error
|
||||
? error.message
|
||||
: 'An unexpected error occurred';
|
||||
|
||||
enqueueErrorSnackBar({ message: errorMessage });
|
||||
enqueueErrorSnackBar({
|
||||
apolloError: error instanceof ApolloError ? error : undefined,
|
||||
});
|
||||
}
|
||||
},
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user