Spot the bug in the async HTTPX client

from HTTPX
HTTPX 0.28.1 / Python 3.14 intermediate 4 min 2 issues to find

This function should reuse asynchronous I/O in a service. Find the two client-boundary bugs.

Python
import httpx

async def load_order(order_id: int) -> dict:
    async with httpx.AsyncClient() as client:
        response = client.get(
            f"https://inventory.test/orders/{order_id}"
        )
    return response.json()
Open in playground
Report an error