Skip to content

Commit

Permalink
fix splunk 404 error msg (#26228)
Browse files Browse the repository at this point in the history
* fixed error message

* update docker image

* update RN
  • Loading branch information
esharf authored and TalNos committed May 3, 2023
1 parent 91c9a08 commit 78e1272
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
6 changes: 4 additions & 2 deletions Packs/SplunkPy/Integrations/SplunkPy/SplunkPy.py
Expand Up @@ -700,6 +700,7 @@ class Cache:
not_yet_submitted_notables (list): The list of all notables that were fetched but not yet submitted.
submitted_notables (list): The list of all submitted notables that needs to be handled.
"""

def __init__(self, not_yet_submitted_notables=None, submitted_notables=None):
self.not_yet_submitted_notables = not_yet_submitted_notables if not_yet_submitted_notables else []
self.submitted_notables = submitted_notables if submitted_notables else []
Expand Down Expand Up @@ -2146,10 +2147,11 @@ def splunk_results_command(service: client.Service):
try:
job = service.job(sid)
except HTTPError as error:
if error.message == 'HTTP 404 Not Found -- Unknown sid.': # pylint: disable=no-member
msg = error.message if hasattr(error, 'message') else str(error)
if error.status == 404:
demisto.results("Found no job for sid: {}".format(sid))
else:
return_error(error.message, error) # pylint: disable=no-member
return_error(msg, error)
else:
for result in results.ResultsReader(job.results(count=limit)):
if isinstance(result, results.Message):
Expand Down
2 changes: 1 addition & 1 deletion Packs/SplunkPy/Integrations/SplunkPy/SplunkPy.yml
Expand Up @@ -628,7 +628,7 @@ script:
- contextPath: Splunk.UserMapping.SplunkUser
description: Splunk user mapping.
type: String
dockerimage: demisto/splunksdk-py3:1.0.0.54635
dockerimage: demisto/splunksdk-py3:1.0.0.56501
isfetch: true
ismappable: true
isremotesyncin: true
Expand Down
7 changes: 7 additions & 0 deletions Packs/SplunkPy/ReleaseNotes/3_0_16.md
@@ -0,0 +1,7 @@

#### Integrations

##### SplunkPy

- Fixed error message for invalid job ids for command *splunk-results*.
- Updated the Docker image to: *demisto/splunksdk-py3:1.0.0.56501*.
2 changes: 1 addition & 1 deletion Packs/SplunkPy/pack_metadata.json
Expand Up @@ -2,7 +2,7 @@
"name": "Splunk",
"description": "Run queries on Splunk servers.",
"support": "xsoar",
"currentVersion": "3.0.15",
"currentVersion": "3.0.16",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down

0 comments on commit 78e1272

Please sign in to comment.