-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Description
Description
When making a PUT or DELETE request, or really any request that returns an HTTP status 204, the request succeeds but the client throws an exception:
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/Users/amandabizzinotto/ombubots/venv/lib/python3.11/site-packages/freckle_client/client.py", line 134, in fetch_json
return json.loads(content)
^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Expected Result
If the request succeeds, no exceptions should be thrown. If there is no content in the response to return, it should return None to explicitly indicate there was no content but the request was successful.
Metadata
Metadata
Assignees
Labels
No labels