From 0d7c2d2fb747487a0afa0b946b1de24d64d5ba87 Mon Sep 17 00:00:00 2001 From: Dominic Jodoin Date: Tue, 22 Mar 2022 21:49:28 -0400 Subject: [PATCH] Handle more exceptions that mean the Exchange server does not have a distinguished folder of this type. --- exchangelib/folders.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exchangelib/folders.py b/exchangelib/folders.py index b074797c..f649d4cb 100644 --- a/exchangelib/folders.py +++ b/exchangelib/folders.py @@ -1024,7 +1024,7 @@ def get_default_folder(self, folder_cls): fld = folder_cls(account=self.account, name=folder_cls.DISTINGUISHED_FOLDER_ID, is_distinguished=True) fld.test_access() return self._folders_map.get(fld.id, fld) # Use cached instance if available - except ErrorFolderNotFound: + except (ErrorFolderNotFound, ErrorItemNotFound, ErrorNoPublicFolderReplicaAvailable): # The Exchange server does not return a distinguished folder of this type pass