Skip to content

Commit

Permalink
Fix errors on certain endpoints that return 204
Browse files Browse the repository at this point in the history
  • Loading branch information
FirePlank committed Nov 7, 2023
1 parent 356c261 commit 1d83ec2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions codingame/http/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ def request(
with self.__session.post(
url, json=parameters, headers=self.headers
) as response:
if response.status_code == 204:
return {} # Return an empty dictionary if status code is 204

data = response.json()
try:
response.raise_for_status()
Expand Down

0 comments on commit 1d83ec2

Please sign in to comment.