From 1ad0c81b806ba754775d9bf6a6c98306e3220084 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 9 Sep 2026 06:38:29 +0000 Subject: [PATCH 1/3] Handle both HTTP body extra-info keys Co-authored-by: afeld <86842+afeld@users.noreply.github.com> --- src/common/exceptions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/exceptions.cpp b/src/common/exceptions.cpp index f4c104ed..b812df68 100644 --- a/src/common/exceptions.cpp +++ b/src/common/exceptions.cpp @@ -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; From 169117142edbdabab0fb4b00045a2ba344dd017f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 9 Sep 2026 06:38:42 +0000 Subject: [PATCH 2/3] Relax HTTPException body assertion Co-authored-by: afeld <86842+afeld@users.noreply.github.com> --- tests/extensions/test_httpfs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/extensions/test_httpfs.py b/tests/extensions/test_httpfs.py index 6529271b..926c6853 100644 --- a/tests/extensions/test_httpfs.py +++ b/tests/extensions/test_httpfs.py @@ -68,7 +68,7 @@ def test_http_exception(self, require): value = exc.value assert value.status_code != 200 - assert value.body == "" + assert isinstance(value.body, str) assert "Content-Length" in value.headers def test_fsspec_priority(self, require): From c309cb351f47ea6f86ba1c2b8c5b1d781b67ec6d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 9 Sep 2026 07:03:17 +0000 Subject: [PATCH 3/3] Require non-empty HTTPException body in test Co-authored-by: afeld <86842+afeld@users.noreply.github.com> --- tests/extensions/test_httpfs.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/extensions/test_httpfs.py b/tests/extensions/test_httpfs.py index 926c6853..2e7c7658 100644 --- a/tests/extensions/test_httpfs.py +++ b/tests/extensions/test_httpfs.py @@ -69,6 +69,7 @@ def test_http_exception(self, require): value = exc.value assert value.status_code != 200 assert isinstance(value.body, str) + assert value.body != "" assert "Content-Length" in value.headers def test_fsspec_priority(self, require):