Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EWS v2] Fix issue with files not opening #37963

Merged
merged 7 commits into from
Jan 12, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1448,9 +1448,10 @@ def parse_attachment_as_dict(item_id, attachment): # pragma: no cover
else ITEM_ATTACHMENT_TYPE
}

except TypeError as e:
if str(e) != "must be string or buffer, not None":
except (TypeError, ErrorCannotOpenFileAttachment) as e:
if str(e) not in ("must be string or buffer, not None", "The attachment could not be opened."):
raise
demisto.debug(f"Add attachment info to context, without the content. Error: {str(e)}")
return {
ATTACHMENT_ORIGINAL_ITEM_ID: item_id,
ATTACHMENT_ID: attachment.attachment_id.id,
Expand Down
6 changes: 6 additions & 0 deletions Packs/MicrosoftExchangeOnPremise/ReleaseNotes/2_1_21.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

#### Integrations

##### EWS v2

Fixed an issue where *fetch-incidents* failed to create an incident when the API could not open the attachment. Such mails will now be created as incidents, without the referenced attachments.
2 changes: 1 addition & 1 deletion Packs/MicrosoftExchangeOnPremise/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Microsoft Exchange On-Premise",
"description": "Exchange Web Services",
"support": "xsoar",
"currentVersion": "2.1.20",
"currentVersion": "2.1.21",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down
Loading