Repository navigation
server: report a provider list maxResults that is not an integer - #125
Closed
littlegrasscao wants to merge 1 commit into
Closed
littlegrasscao wants to merge 1 commit into
littlegrasscao wants to merge 1 commit into
Conversation
littlegrasscao
added this pull request to stack #126
October 21, 2026 21:30
littlegrasscao
removed this pull request from stack #126
October 21, 2026 21:36
Collaborator
Author
|
Dropped: the provider and protocol list endpoints keep the typed @PARAM Integer maxResults; a non-integer value is already 400 INVALID_PARAMETER_VALUE, and only the message wording would differ. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GET /shares,GET /shares/{share}/permissionsandGET /recipients) tookmaxResultsas anInteger, which Armeria parses before the endpoint runs, so a value such astenwas 400 with Java's parse message (For input string: "ten")Pagination.maxResultsreads the query parameter instead: a value that is not an integer is 400INVALID_PARAMETER_VALUEwith the messagemaxResults must be an integer, and an empty value counts as unsetmaxResultsas a string and read it throughPagination.maxResults; the paging rules are unchangedTesting
mvn clean verify: 127 tests passedProviderMaxResultsTest:ten,1.5and an out-of-range3000000000are 400 with the new message on all three lists, and an emptymaxResultslists as if unset