[8.19] fix(outlook): skip unexpected item types and harden folder/account error handling (#4158) - #4178
Merged
Conversation
…ount error handling (#4158) Manual backport of #4158 to 8.19's monolithic outlook.py layout. Guard every folder-iteration site against stray item types, broaden per-folder EWS skips, skip accounts on ErrorAccessDenied, harden attachment extraction, and use exchangelib UTC as the timezone fallback. Co-authored-by: Cursor <cursoragent@cursor.com>
Jan-Kazlouski-elastic
requested review from
a team,
artem-shelkovnikov and
erikcurrin-elastic
July 16, 2026 17:50
Jan-Kazlouski-elastic
enabled auto-merge (squash)
July 16, 2026 19:48
Jan-Kazlouski-elastic
requested review from
erikcurrin-elastic
and removed request for
erikcurrin-elastic
July 16, 2026 19:48
erikcurrin-elastic
approved these changes
Jul 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backports #4158 to
8.19.Related to https://github.com/elastic/sdh-search/issues/1898
Follow-up to #4147 / #4153. Auto-backport to 8.19 failed due to conflicts from the
outlook/package split onmain.Summary
Message/Meeting*,Task,CalendarItem,Contact/DistributionList); stray types are logged and skipped instead of aborting the sync.FOLDER_SKIP_ERRORS(ErrorFolderNotFound+ErrorManagedFolderNotFound)."Archive"folders before projecting fields.ErrorAccessDenied(in addition toErrorNonExistentMailbox); connection-wide errors still propagate.FileAttachmentcontent; skip missingname/Nonesize.DEFAULT_TIMEZONE = "UTC"string fallback withexchangelib.UTC.list(...)insideasyncio.to_threadso the blocking EWS fetch stays off the event loop.Backport notes
connectors/sources/outlook.pylayout (rather than theoutlook/package onmain), so the changes were manually adapted to that single module. Behaviour matches fix(outlook): skip unexpected item types and harden folder/account error handling #4158.TypeErrorfrom [8.19] fix(outlook): dispatch Contacts by item type and harden folder/field assumptions (#4147) #4153.Test plan
pytest tests/sources/test_outlook.py(94 passed)ruff check/ruff format --checkMade with Cursor