Skip to content

Commit 68517f6

Browse files
committed
Decode bytes in ternary
1 parent 3392ad2 commit 68517f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/together/abstract/api_requestor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,7 @@ def _interpret_response_line(
698698
data = json.loads(rbody)
699699
except (JSONDecodeError, UnicodeDecodeError) as e:
700700
raise error.APIError(
701-
f"Error code: {rcode} -{rbody}",
701+
f"Error code: {rcode} -{rbody if isinstance(rbody, str) else rbody.decode()}",
702702
http_status=rcode,
703703
headers=rheaders,
704704
) from e

0 commit comments

Comments
 (0)