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

[SplunkPy] Fix An Issue with parse response #28451

Merged
merged 12 commits into from Jul 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 3 additions & 6 deletions Packs/SplunkPy/Integrations/SplunkPy/SplunkPy.py
Expand Up @@ -2053,11 +2053,8 @@ def parse_batch_of_results(current_batch_of_results, max_results_to_add, app):
batch_dbot_scores = []
results_reader = results.JSONResultsReader(io.BufferedReader(ResponseReaderWrapper(current_batch_of_results)))
for item in results_reader:
if isinstance(item, results.Message):
if "Error in" in item.message:
raise ValueError(item.message)
demisto.debug(f"Splunk-SDK message: {item.message}")
parsed_batch_results.append(convert_to_str(item.message))
if handle_message(item):
continue

elif isinstance(item, dict):
if demisto.get(item, 'host'):
Expand Down Expand Up @@ -2642,7 +2639,7 @@ def handle_message(item: results.Message | dict) -> bool:

"""
if isinstance(item, results.Message):
demisto.debug(f"Splunk-SDK message: {item.message}")
demisto.info(f"Splunk-SDK message: {item.message}")
return True
return False

Expand Down
2 changes: 1 addition & 1 deletion Packs/SplunkPy/Integrations/SplunkPy/SplunkPy.yml
Expand Up @@ -626,7 +626,7 @@ script:
- contextPath: Splunk.UserMapping.SplunkUser
description: Splunk user mapping.
type: String
dockerimage: demisto/splunksdk-py3:1.0.0.66149
dockerimage: demisto/splunksdk-py3:1.0.0.66897
isfetch: true
ismappable: true
isremotesyncin: true
Expand Down