Skip to content

Commit

Permalink
Update client.py
Browse files Browse the repository at this point in the history
  • Loading branch information
SeaBlooms committed Aug 29, 2024
1 parent fa3350d commit acd8868
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion jupiterone/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ def _limit_and_skip_query(

return {"data": results}

def _execute_syncapi_request(self, endpoint: str, payload: Dict = None) -> Dict:
def _execute_syncapi_request(self, endpoint: str, payload: Dict):

Check notice

Code scanning / CodeQL

Explicit returns mixed with implicit (fall through) returns Note

Mixing implicit and explicit returns may indicate an error as implicit returns always return None.
"""Executes POST request to SyncAPI endpoints"""

# initiate requests session and implement retry logic of 5 request retries with 1 second between
Expand All @@ -266,6 +266,7 @@ def _execute_syncapi_request(self, endpoint: str, payload: Dict = None) -> Dict:
"JupiterOne API rate limit exceeded"
)
raise JupiterOneApiError(content.get("errors"))

return response.json()

elif response.status_code == 401:
Expand Down

0 comments on commit acd8868

Please sign in to comment.