We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
PrefectHTTPStatusError: Client error '429 Too Many Requests' for url
### First check

- [X] I added a descriptive title to this issue.
- [X] I used the GitHub search to find a similar issue and didn't find it.
- [X] I searched the Prefect documentation for this issue.
- [X] I checked that this issue is related to Prefect and not one of its dependencies.

### Bug summary

While using `prefect` with `prefect-dask` I encountered a rate limit error. this shouldn't be happening as prefect client base should retry on those. I'm not sure why this is happening but this has risen at `2.10.10` and did not exist before

### Reproduction

```python3
Any Flow with prefect-dask
```


### Error

```python3
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/dist-packages/distributed/client.py", line 1697, in _close
    await self.scheduler_comm.close()
asyncio.exceptions.CancelledError
01:00:08.452 | ERROR   | Flow run 'psi5-alastria-x' - Crash detected! Execution was interrupted by an unexpected exception: PrefectHTTPStatusError: Client error '429 Too Many Requests' for url 'https://cloud-url/task_runs/'
Response: {'detail': 'Orchestration API rate limit reached'}
For more information check: https://httpstatuses.com/429
```


### Versions

```Text
Version:             2.10.10
API version:         0.8.4
Python version:      3.11.2
Git commit:          8159450b
Built:               Thu, May 18, 2023 3:43 PM
OS/Arch:             linux/x86_64
Profile:             default
Server type:         server
```


### Additional context

_No response_

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `src/prefect/client/cloud.py`
Content:
```
1 import re
2 from typing import Any, Dict, List, Optional
3 
4 import anyio
5 import httpx
6 import pydantic
7 from fastapi import status
8 
9 import prefect.context
10 import prefect.settings
11 from prefect.client.schemas import Workspace
12 from prefect.exceptions import PrefectException
13 from prefect.settings import PREFECT_API_KEY, PREFECT_CLOUD_API_URL
14 
15 
16 def get_cloud_client(
17     host: Optional[str] = None,
18     api_key: Optional[str] = None,
19     httpx_settings: Optional[dict] = None,
20     infer_cloud_url: bool = False,
21 ) -> "CloudClient":
22     """
23     Needs a docstring.
24     """
25     if httpx_settings is not None:
26         httpx_settings = httpx_settings.copy()
27 
28     if infer_cloud_url is False:
29         host = host or PREFECT_CLOUD_API_URL.value()
30     else:
31         configured_url = prefect.settings.PREFECT_API_URL.value()
32         host = re.sub(r"accounts/.{36}/workspaces/.{36}\Z", "", configured_url)
33 
34     return CloudClient(
35         host=host,
36         api_key=api_key or PREFECT_API_KEY.value(),
37         httpx_settings=httpx_settings,
38     )
39 
40 
41 class CloudUnauthorizedError(PrefectException):
42     """
43     Raised when the CloudClient receives a 401 or 403 from the Cloud API.
44     """
45 
46 
47 class CloudClient:
48     def __init__(
49         self,
50         host: str,
51         api_key: str,
52         httpx_settings: dict = None,
53     ) -> None:
54         httpx_settings = httpx_settings or dict()
55         httpx_settings.setdefault("headers", dict())
56         httpx_settings["headers"].setdefault("Authorization", f"Bearer {api_key}")
57 
58         httpx_settings.setdefault("base_url", host)
59         self._client = httpx.AsyncClient(**httpx_settings)
60 
61     async def api_healthcheck(self):
62         """
63         Attempts to connect to the Cloud API and raises the encountered exception if not
64         successful.
65 
66         If successful, returns `None`.
67         """
68         with anyio.fail_after(10):
69             await self.read_workspaces()
70 
71     async def read_workspaces(self) -> List[Workspace]:
72         return pydantic.parse_obj_as(List[Workspace], await self.get("/me/workspaces"))
73 
74     async def read_worker_metadata(self) -> Dict[str, Any]:
75         return await self.get("collections/views/aggregate-worker-metadata")
76 
77     async def __aenter__(self):
78         await self._client.__aenter__()
79         return self
80 
81     async def __aexit__(self, *exc_info):
82         return await self._client.__aexit__(*exc_info)
83 
84     def __enter__(self):
85         raise RuntimeError(
86             "The `CloudClient` must be entered with an async context. Use 'async "
87             "with CloudClient(...)' not 'with CloudClient(...)'"
88         )
89 
90     def __exit__(self, *_):
91         assert False, "This should never be called but must be defined for __enter__"
92 
93     async def get(self, route, **kwargs):
94         try:
95             res = await self._client.get(route, **kwargs)
96             res.raise_for_status()
97         except httpx.HTTPStatusError as exc:
98             if exc.response.status_code in (
99                 status.HTTP_401_UNAUTHORIZED,
100                 status.HTTP_403_FORBIDDEN,
101             ):
102                 raise CloudUnauthorizedError
103             else:
104                 raise exc
105 
106         return res.json()
107
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/src/prefect/client/cloud.py b/src/prefect/client/cloud.py
--- a/src/prefect/client/cloud.py
+++ b/src/prefect/client/cloud.py
@@ -8,6 +8,7 @@
 
 import prefect.context
 import prefect.settings
+from prefect.client.base import PrefectHttpxClient
 from prefect.client.schemas import Workspace
 from prefect.exceptions import PrefectException
 from prefect.settings import PREFECT_API_KEY, PREFECT_CLOUD_API_URL
@@ -56,7 +57,7 @@
         httpx_settings["headers"].setdefault("Authorization", f"Bearer {api_key}")
 
         httpx_settings.setdefault("base_url", host)
-        self._client = httpx.AsyncClient(**httpx_settings)
+        self._client = PrefectHttpxClient(**httpx_settings)
 
     async def api_healthcheck(self):
         """

{"golden_diff": "diff --git a/src/prefect/client/cloud.py b/src/prefect/client/cloud.py\n--- a/src/prefect/client/cloud.py\n+++ b/src/prefect/client/cloud.py\n@@ -8,6 +8,7 @@\n \n import prefect.context\n import prefect.settings\n+from prefect.client.base import PrefectHttpxClient\n from prefect.client.schemas import Workspace\n from prefect.exceptions import PrefectException\n from prefect.settings import PREFECT_API_KEY, PREFECT_CLOUD_API_URL\n@@ -56,7 +57,7 @@\n         httpx_settings[\"headers\"].setdefault(\"Authorization\", f\"Bearer {api_key}\")\n \n         httpx_settings.setdefault(\"base_url\", host)\n-        self._client = httpx.AsyncClient(**httpx_settings)\n+        self._client = PrefectHttpxClient(**httpx_settings)\n \n     async def api_healthcheck(self):\n         \"\"\"\n", "issue": "PrefectHTTPStatusError: Client error '429 Too Many Requests' for url\n### First check\r\n\r\n- [X] I added a descriptive title to this issue.\r\n- [X] I used the GitHub search to find a similar issue and didn't find it.\r\n- [X] I searched the Prefect documentation for this issue.\r\n- [X] I checked that this issue is related to Prefect and not one of its dependencies.\r\n\r\n### Bug summary\r\n\r\nWhile using `prefect` with `prefect-dask` I encountered a rate limit error. this shouldn't be happening as prefect client base should retry on those. I'm not sure why this is happening but this has risen at `2.10.10` and did not exist before\r\n\r\n### Reproduction\r\n\r\n```python3\r\nAny Flow with prefect-dask\r\n```\r\n\r\n\r\n### Error\r\n\r\n```python3\r\nTraceback (most recent call last):\r\n  File \"/usr/local/lib/python3.11/dist-packages/distributed/client.py\", line 1697, in _close\r\n    await self.scheduler_comm.close()\r\nasyncio.exceptions.CancelledError\r\n01:00:08.452 | ERROR   | Flow run 'psi5-alastria-x' - Crash detected! Execution was interrupted by an unexpected exception: PrefectHTTPStatusError: Client error '429 Too Many Requests' for url 'https://cloud-url/task_runs/'\r\nResponse: {'detail': 'Orchestration API rate limit reached'}\r\nFor more information check: https://httpstatuses.com/429\r\n```\r\n\r\n\r\n### Versions\r\n\r\n```Text\r\nVersion:             2.10.10\r\nAPI version:         0.8.4\r\nPython version:      3.11.2\r\nGit commit:          8159450b\r\nBuilt:               Thu, May 18, 2023 3:43 PM\r\nOS/Arch:             linux/x86_64\r\nProfile:             default\r\nServer type:         server\r\n```\r\n\r\n\r\n### Additional context\r\n\r\n_No response_\n", "before_files": [{"content": "import re\nfrom typing import Any, Dict, List, Optional\n\nimport anyio\nimport httpx\nimport pydantic\nfrom fastapi import status\n\nimport prefect.context\nimport prefect.settings\nfrom prefect.client.schemas import Workspace\nfrom prefect.exceptions import PrefectException\nfrom prefect.settings import PREFECT_API_KEY, PREFECT_CLOUD_API_URL\n\n\ndef get_cloud_client(\n    host: Optional[str] = None,\n    api_key: Optional[str] = None,\n    httpx_settings: Optional[dict] = None,\n    infer_cloud_url: bool = False,\n) -> \"CloudClient\":\n    \"\"\"\n    Needs a docstring.\n    \"\"\"\n    if httpx_settings is not None:\n        httpx_settings = httpx_settings.copy()\n\n    if infer_cloud_url is False:\n        host = host or PREFECT_CLOUD_API_URL.value()\n    else:\n        configured_url = prefect.settings.PREFECT_API_URL.value()\n        host = re.sub(r\"accounts/.{36}/workspaces/.{36}\\Z\", \"\", configured_url)\n\n    return CloudClient(\n        host=host,\n        api_key=api_key or PREFECT_API_KEY.value(),\n        httpx_settings=httpx_settings,\n    )\n\n\nclass CloudUnauthorizedError(PrefectException):\n    \"\"\"\n    Raised when the CloudClient receives a 401 or 403 from the Cloud API.\n    \"\"\"\n\n\nclass CloudClient:\n    def __init__(\n        self,\n        host: str,\n        api_key: str,\n        httpx_settings: dict = None,\n    ) -> None:\n        httpx_settings = httpx_settings or dict()\n        httpx_settings.setdefault(\"headers\", dict())\n        httpx_settings[\"headers\"].setdefault(\"Authorization\", f\"Bearer {api_key}\")\n\n        httpx_settings.setdefault(\"base_url\", host)\n        self._client = httpx.AsyncClient(**httpx_settings)\n\n    async def api_healthcheck(self):\n        \"\"\"\n        Attempts to connect to the Cloud API and raises the encountered exception if not\n        successful.\n\n        If successful, returns `None`.\n        \"\"\"\n        with anyio.fail_after(10):\n            await self.read_workspaces()\n\n    async def read_workspaces(self) -> List[Workspace]:\n        return pydantic.parse_obj_as(List[Workspace], await self.get(\"/me/workspaces\"))\n\n    async def read_worker_metadata(self) -> Dict[str, Any]:\n        return await self.get(\"collections/views/aggregate-worker-metadata\")\n\n    async def __aenter__(self):\n        await self._client.__aenter__()\n        return self\n\n    async def __aexit__(self, *exc_info):\n        return await self._client.__aexit__(*exc_info)\n\n    def __enter__(self):\n        raise RuntimeError(\n            \"The `CloudClient` must be entered with an async context. Use 'async \"\n            \"with CloudClient(...)' not 'with CloudClient(...)'\"\n        )\n\n    def __exit__(self, *_):\n        assert False, \"This should never be called but must be defined for __enter__\"\n\n    async def get(self, route, **kwargs):\n        try:\n            res = await self._client.get(route, **kwargs)\n            res.raise_for_status()\n        except httpx.HTTPStatusError as exc:\n            if exc.response.status_code in (\n                status.HTTP_401_UNAUTHORIZED,\n                status.HTTP_403_FORBIDDEN,\n            ):\n                raise CloudUnauthorizedError\n            else:\n                raise exc\n\n        return res.json()\n", "path": "src/prefect/client/cloud.py"}], "after_files": [{"content": "import re\nfrom typing import Any, Dict, List, Optional\n\nimport anyio\nimport httpx\nimport pydantic\nfrom fastapi import status\n\nimport prefect.context\nimport prefect.settings\nfrom prefect.client.base import PrefectHttpxClient\nfrom prefect.client.schemas import Workspace\nfrom prefect.exceptions import PrefectException\nfrom prefect.settings import PREFECT_API_KEY, PREFECT_CLOUD_API_URL\n\n\ndef get_cloud_client(\n    host: Optional[str] = None,\n    api_key: Optional[str] = None,\n    httpx_settings: Optional[dict] = None,\n    infer_cloud_url: bool = False,\n) -> \"CloudClient\":\n    \"\"\"\n    Needs a docstring.\n    \"\"\"\n    if httpx_settings is not None:\n        httpx_settings = httpx_settings.copy()\n\n    if infer_cloud_url is False:\n        host = host or PREFECT_CLOUD_API_URL.value()\n    else:\n        configured_url = prefect.settings.PREFECT_API_URL.value()\n        host = re.sub(r\"accounts/.{36}/workspaces/.{36}\\Z\", \"\", configured_url)\n\n    return CloudClient(\n        host=host,\n        api_key=api_key or PREFECT_API_KEY.value(),\n        httpx_settings=httpx_settings,\n    )\n\n\nclass CloudUnauthorizedError(PrefectException):\n    \"\"\"\n    Raised when the CloudClient receives a 401 or 403 from the Cloud API.\n    \"\"\"\n\n\nclass CloudClient:\n    def __init__(\n        self,\n        host: str,\n        api_key: str,\n        httpx_settings: dict = None,\n    ) -> None:\n        httpx_settings = httpx_settings or dict()\n        httpx_settings.setdefault(\"headers\", dict())\n        httpx_settings[\"headers\"].setdefault(\"Authorization\", f\"Bearer {api_key}\")\n\n        httpx_settings.setdefault(\"base_url\", host)\n        self._client = PrefectHttpxClient(**httpx_settings)\n\n    async def api_healthcheck(self):\n        \"\"\"\n        Attempts to connect to the Cloud API and raises the encountered exception if not\n        successful.\n\n        If successful, returns `None`.\n        \"\"\"\n        with anyio.fail_after(10):\n            await self.read_workspaces()\n\n    async def read_workspaces(self) -> List[Workspace]:\n        return pydantic.parse_obj_as(List[Workspace], await self.get(\"/me/workspaces\"))\n\n    async def read_worker_metadata(self) -> Dict[str, Any]:\n        return await self.get(\"collections/views/aggregate-worker-metadata\")\n\n    async def __aenter__(self):\n        await self._client.__aenter__()\n        return self\n\n    async def __aexit__(self, *exc_info):\n        return await self._client.__aexit__(*exc_info)\n\n    def __enter__(self):\n        raise RuntimeError(\n            \"The `CloudClient` must be entered with an async context. Use 'async \"\n            \"with CloudClient(...)' not 'with CloudClient(...)'\"\n        )\n\n    def __exit__(self, *_):\n        assert False, \"This should never be called but must be defined for __enter__\"\n\n    async def get(self, route, **kwargs):\n        try:\n            res = await self._client.get(route, **kwargs)\n            res.raise_for_status()\n        except httpx.HTTPStatusError as exc:\n            if exc.response.status_code in (\n                status.HTTP_401_UNAUTHORIZED,\n                status.HTTP_403_FORBIDDEN,\n            ):\n                raise CloudUnauthorizedError\n            else:\n                raise exc\n\n        return res.json()\n", "path": "src/prefect/client/cloud.py"}]}