Bound a page size
Take your time, follow the code and check your understanding.
The codeHTTP and validation
def products(limit: int = Query(default=10, ge=1, le=50)):
...
# GET /products?limit=500Your answer4 min · no timer
Show solution and explanation
Query bounds reject values outside the accepted range; they do not clamp the caller’s input.
The request fails validation (422).