Skip to content
This repository was archived by the owner on Mar 4, 2026. It is now read-only.

Commit a4a5fbf

Browse files
committed
handle non-dict error data
Signed-off-by: Peter Howe <pnhowe@gmail.com>
1 parent 29bfd53 commit a4a5fbf

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

packet/baseapi.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ class ResponseError(Error):
2525
def __init__(self, resp, data, exception=None):
2626
if not data:
2727
msg = "(empty response)"
28+
elif not isinstance(data, dict):
29+
msg = str(data)
2830
elif "error" in data:
2931
msg = data["error"]
3032
elif "errors" in data:

0 commit comments

Comments
 (0)