Skip to content

Commit 6672684

Browse files
committed
SLK-103546 - PR Fixes #2
1 parent 9a260cb commit 6672684

File tree

3 files changed

+0
-12
lines changed

3 files changed

+0
-12
lines changed

modules/single/modules/lambda/functions/create_cspm_key.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,6 @@ def get_bearer_token(cspm_base_url, api_key, aqua_secret, tstmp):
8181
raise Exception(f"Failed to get Bearer token: {data}")
8282

8383
json_object = json.loads(data)
84-
if json_object.get('status') != 200:
85-
error_msg = json_object.get('message', 'Unknown error')
86-
raise Exception(f"Tokens API failed: {error_msg}")
87-
8884
return json_object['data']
8985

9086

modules/single/modules/lambda/functions/generate_external_id.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,6 @@ def get_bearer_token(cspm_base_url, api_key, aqua_secret, tstmp):
7070
raise Exception(f"Failed to get Bearer token: {data}")
7171

7272
json_object = json.loads(data)
73-
if json_object.get('status') != 200:
74-
error_msg = json_object.get('message', 'Unknown error')
75-
raise Exception(f"Tokens API failed: {error_msg}")
76-
7773
return json_object['data']
7874

7975

modules/single/modules/trigger/trigger-aws.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,6 @@ def get_bearer_token(cspm_base_url, api_key, aqua_secret, tstmp):
9696
raise Exception(f"Failed to get Bearer token: {data}")
9797

9898
json_object = json.loads(data.strip())
99-
if json_object.get('status') != 200:
100-
error_msg = json_object.get('message', 'Unknown error')
101-
raise Exception(f"Tokens API failed: {error_msg}")
102-
10399
return json_object['data']
104100

105101

0 commit comments

Comments
 (0)