Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/common/exceptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ void PyThrowException(ErrorData &error, PyObject *http_exception) {
for (auto &entry : error.ExtraInfo()) {
if (entry.first == "status_code") {
e.attr("status_code") = std::stoi(entry.second);
} else if (entry.first == "response_body") {
} else if (entry.first == "response_body" || entry.first == "body") {
e.attr("body") = entry.second;
} else if (entry.first == "reason") {
e.attr("reason") = entry.second;
Expand Down
3 changes: 2 additions & 1 deletion tests/extensions/test_httpfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ def test_http_exception(self, require):

value = exc.value
assert value.status_code != 200
assert value.body == ""
assert isinstance(value.body, str)
Comment thread
afeld marked this conversation as resolved.
assert value.body != ""
assert "Content-Length" in value.headers

def test_fsspec_priority(self, require):
Expand Down