fix(bitbucket-server): getUsersByEmail pagination zod error#37533
Merged
rarkins merged 1 commit intorenovatebot:mainfrom Aug 15, 2025
Merged
Conversation
…ausing errors. Explicitly added paginate again with a limit. Signed-off-by: portly-halicore-76 <170707699+portly-halicore-76@users.noreply.github.com>
rarkins
suggested changes
Aug 15, 2025
Contributor
rarkins
left a comment
There was a problem hiding this comment.
Please test against a real repo before we merge any more PRs
Contributor
Author
I totally understand. That have been done against a real repo! I've tested it in combination with the changes in #37510 |
rarkins
approved these changes
Aug 15, 2025
|
🎉 This PR is included in version 41.73.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Without the
paginateoption, no array but an object was returned, c…ausing errors. Explicitly added paginate again with a limit.Changes
Adds the
paginate: truehttpOption to the getUsersFiltered httpCall.Context
In #37199 the logic was added, to try to resolve emailAddresses to userSlugs when adding reviewers. This is done via a REST api call to BitBucket server. We concluded a limit op 100 results should be enough to match the requested user. However, in prod env, I get an error from ZOD on this call. It expects an array to be returned but it is an object. Debugging found that my initial comment was wrong. We need to explicitly add:
paginate: trueto the request, for the logic of to parse the response into a valuesarray. This fixes the error.Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via: