Skip to content

Commit

Permalink
AUT-2461: updating python sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
LittleJono committed Nov 28, 2024
1 parent 4c416f3 commit 6fde571
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions authsignal/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ def prepare_request(self, request):
data = json.loads(prepared_request.body)
cleaned_data = self._remove_none_values(data)
prepared_request.body = json.dumps(cleaned_data)

return prepared_request

@staticmethod
Expand All @@ -69,12 +68,9 @@ def send(self, request, **kwargs) -> requests.Response:
response.raise_for_status()

if response.headers.get("Content-Type") == "application/json":
try:
data = response.json()
decamelized_content = humps.decamelize(data)
response.decamelized_content = decamelized_content
except json.JSONDecodeError:
response.decamelized_content = None
data = response.json()
decamelized_content = humps.decamelize(data)
response.decamelized_content = decamelized_content
return response
except requests.exceptions.RequestException as e:
error_code = None
Expand Down

0 comments on commit 6fde571

Please sign in to comment.