Skip to content

Commit 2393509

Browse files
authored
fix(py-client): Don't call str on bytes (#225)
1 parent 019b6fe commit 2393509

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

clients/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## 0.0.13
4+
5+
### Fixes
6+
7+
- fix(py-client): Don't call str on bytes (#225) by @lcian
8+
39
## 0.0.12
410

511
### Features

clients/python/src/objectstore_client/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ def delete(self, key: str) -> None:
355355

356356
def raise_for_status(response: urllib3.BaseHTTPResponse) -> None:
357357
if response.status >= 400:
358-
res = str(response.data or response.read())
358+
res = (response.data or response.read() or b"").decode("utf-8", "replace")
359359
raise RequestError(
360360
f"Objectstore request failed with status {response.status}",
361361
response.status,

0 commit comments

Comments
 (0)