Closed arhimede closed 3 years ago
Both DotKernel API 1.0 and 3.0 return correctly a 400 response when the specified page number is out of bounds. Outputted response should look similar to this:
{
"error": {
"messages": [
"Page 10 is out of bounds. Collection has 9 pages."
]
}
}
With older versions of DotKernel API the issue may still be encountered. In this case we recommend updating your packages using composer update
. If the issue still persists, please open a new issue and include the output of composer show
command.
Page %d is out of bounds. Collection has %d page%s.' https://github.com/mezzio/mezzio-hal/blob/2.1.x/src/ResourceGenerator/ExtractCollectionTrait.php
Line 219
when you try to return pagination results and you are out of bound
Need to be treated in the app code, in the return , a try catch