Skip to content

Commit

Permalink
JAMF Protect: Log errorneous responses (#37013)
Browse files Browse the repository at this point in the history
* add log

* fix typo
  • Loading branch information
dorschw authored Oct 31, 2024
1 parent 7c49790 commit 030d1ab
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,9 @@ def handle_errors(self, res: dict) -> None:
DemistoException: If the response contains any errors.
"""
if "errors" in res:
demisto.debug(f"Erroneous response: {res}")
errors = "\n".join([error.get("message") for error in res.get("errors", [])])
raise DemistoException(errors)
raise DemistoException(errors, res=res)

def graphql(self, query: str, variables: dict) -> dict:
"""
Expand Down
6 changes: 6 additions & 0 deletions Packs/JamfProtect/ReleaseNotes/1_1_3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

#### Integrations

##### Jamf Protect Event Collector

- Added logging of erroneous responses.
2 changes: 1 addition & 1 deletion Packs/JamfProtect/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "JamfProtect",
"description": "Apple Mobile and Mac endpoint protection",
"support": "xsoar",
"currentVersion": "1.1.2",
"currentVersion": "1.1.3",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down

0 comments on commit 030d1ab

Please sign in to comment.