Skip to content

Commit 5bba4a0

Browse files
committed
Refine support for 204 No Content response #350
Signed-off-by: tdruez <tdruez@nexb.com>
1 parent 57a7ea2 commit 5bba4a0

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

workflow/integrations/base.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ def request(self, method, url, params=None, data=None, json=None):
6262
self._log_http_error(method, url, response, error)
6363
raise
6464

65+
# If there's no content (e.g. 204 No Content), return None
66+
if response.status_code == 204:
67+
return
68+
6569
return response.json()
6670

6771
def _log_http_error(self, method, url, response, error):

0 commit comments

Comments
 (0)