aip-dev / google.aip.dev

API Improvement Proposals. https://aip.dev/
Other
1.08k stars 495 forks source link

[AIP-158] Pagination: page_size should throw an error when it exceeds maximum acceptable value. #1428

Open ritesh-goog opened 2 weeks ago

ritesh-goog commented 2 weeks ago

This is w.r.t. guidance for Pagination (AIP-158).

Currently, is says:

If the user specifies page_size greater than the maximum permitted by the API, the API should coerce down to the maximum permitted page size.

This doesn't seem right. We should throw INVALID_ARGUMENT error if the page_size is present and is greater than the maximum value permitted by the API (similar to when page size is less than 0).