Skip to content

Commit 715ee03

Browse files
committed
RDBC-893 Fix parsing of errors inside RequestExecutor._handle_unsuccessful_response
1 parent 7b4712c commit 715ee03

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

ravendb/http/request_executor.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1104,13 +1104,10 @@ def _handle_unsuccessful_response(
11041104
return True
11051105
else:
11061106
command.on_response_failure(response)
1107-
try: # todo: exception dispatcher
1108-
raise RuntimeError(
1109-
json.loads(response.text).get("Message", "Missing message")
1110-
)
1107+
try: # todo: exception dispatcher
1108+
raise RuntimeError(json.loads(response.text).get("Message", "Missing message"))
11111109
except JSONDecodeError as e:
1112-
raise RuntimeError(
1113-
f"Failed to parse response: {response.text}") from e
1110+
raise RuntimeError(f"Failed to parse response: {response.text}") from e
11141111

11151112
return False
11161113

0 commit comments

Comments
 (0)