Skip to content

Commit 942c693

Browse files
authored
fix(api): update post req json response (#8)
1 parent 1a357da commit 942c693

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

kafka_connect_api/kafka_connect_api.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,10 @@ def post_raw(self, query_path, **kwargs) -> Response:
384384

385385
def post(self, query_path, **kwargs):
386386
req = self.post_raw(query_path, **kwargs)
387-
return req.json()
387+
try:
388+
return req.json()
389+
except ValueError:
390+
return req
388391

389392
@evaluate_api_return
390393
def put_raw(self, query_path, **kwargs) -> Response:

0 commit comments

Comments
 (0)