Let say we have only 30 products and a REST API with QueryString parameters used for pagination. In the exemple below pagesize
is the number of resources per page
.
api/products?page=1pagesize=10
What do you prefer to answer when the request is asking for a page over the max page like the following?
api/products?page=125&pagesize=10
I would go with Not Found, since the request's syntax is perfectly fine. See the status code explanations