diff --git a/requirements-docs-tests.txt b/requirements-docs-tests.txt
index 71f4a7ab9..e7684a2e3 100644
--- a/requirements-docs-tests.txt
+++ b/requirements-docs-tests.txt
@@ -1,4 +1,4 @@
 # For mkdocstrings and tests
-httpx >=0.23.0,<0.28.0
+httpx >=0.23.0,<0.29.0
 # For linting and generating docs versions
 ruff ==0.11.2
diff --git a/requirements-github-actions.txt b/requirements-github-actions.txt
index 920aefea6..f807d06a8 100644
--- a/requirements-github-actions.txt
+++ b/requirements-github-actions.txt
@@ -1,6 +1,6 @@
 PyGithub>=2.3.0,<3.0.0
 pydantic>=2.5.3,<3.0.0
 pydantic-settings>=2.1.0,<3.0.0
-httpx>=0.27.0,<0.28.0
+httpx>=0.27.0,<0.29.0
 pyyaml >=5.3.1,<7.0.0
 smokeshow
diff --git a/tests/test_tutorial/test_custom_request_and_route/test_tutorial002.py b/tests/test_tutorial/test_custom_request_and_route/test_tutorial002.py
index 6f7355aaa..8c24b75e9 100644
--- a/tests/test_tutorial/test_custom_request_and_route/test_tutorial002.py
+++ b/tests/test_tutorial/test_custom_request_and_route/test_tutorial002.py
@@ -14,6 +14,21 @@ def test_endpoint_works():
 def test_exception_handler_body_access():
     response = client.post("/", json={"numbers": [1, 2, 3]})
     assert response.json() == IsDict(
+        # httpx 0.28.0 switches to compact JSON https://github.com/encode/httpx/issues/3363
+        {
+            "detail": {
+                "errors": [
+                    {
+                        "type": "list_type",
+                        "loc": ["body"],
+                        "msg": "Input should be a valid list",
+                        "input": {"numbers": [1, 2, 3]},
+                    }
+                ],
+                "body": '{"numbers":[1,2,3]}',
+            }
+        }
+    ) | IsDict(
         {
             "detail": {
                 "errors": [
@@ -27,6 +42,20 @@ def test_exception_handler_body_access():
                 "body": '{"numbers": [1, 2, 3]}',
             }
         }
+    ) | IsDict(
+        # TODO: remove when deprecating Pydantic v1
+        {
+            "detail": {
+                "body": '{"numbers":[1,2,3]}',
+                "errors": [
+                    {
+                        "loc": ["body"],
+                        "msg": "value is not a valid list",
+                        "type": "type_error.list",
+                    }
+                ],
+            }
+        }
     ) | IsDict(
         # TODO: remove when deprecating Pydantic v1
         {