You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had searched in the issues and found no similar issues.
What happened
Url: /api/plugins/gitlab/connections/{connectionId}/remote-scopes
Query: groupId: xxx
Method: GET
When I accessed the api above, I got the response body with nextPageToken(eyJwYWdlIjoyLCJwZXJfcGFnZSI6MTAwLCJzdGVwIjoicHJvamVjdCJ9).
The decoded content of nextPageToken is {"page":2,"per_page":100,"step":"project"}.
But when I continued accessing the api above with extra queryParam - pageToken: eyJwYWdlIjoyLCJwZXJfcGFnZSI6MTAwLCJzdGVwIjoicHJvamVjdCJ9, I got the same result with the first result
What do you expect to happen
I want to get the result with page 2, but also get the result with page 1
Hello @usst830514! I'm here to help you with any software bugs, questions, or becoming a contributor. Let's work together to resolve the issue you're facing.
The issue you're experiencing, where the same page of results is returned despite using a different pageToken, could be due to how the pageToken is processed. If the pageToken is invalid or cannot be decoded properly, the function responsible for handling it defaults to returning the first page. This could explain why you're seeing the same results for both page 1 and page 2.
The function getPageDataFromPageTokenWithTag decodes the pageToken from Base64 and unmarshals it into a struct. If there's an error during this process, it defaults to the first page [1].
To troubleshoot this issue, ensure that the pageToken is correctly encoded and passed to the API. You might also want to check if there are any errors in the decoding or unmarshalling process that could be causing the default behavior.
Search before asking
What happened
Url: /api/plugins/gitlab/connections/{connectionId}/remote-scopes
Query: groupId: xxx
Method: GET
When I accessed the api above, I got the response body with nextPageToken(eyJwYWdlIjoyLCJwZXJfcGFnZSI6MTAwLCJzdGVwIjoicHJvamVjdCJ9).
The decoded content of nextPageToken is {"page":2,"per_page":100,"step":"project"}.
But when I continued accessing the api above with extra queryParam - pageToken: eyJwYWdlIjoyLCJwZXJfcGFnZSI6MTAwLCJzdGVwIjoicHJvamVjdCJ9, I got the same result with the first result
What do you expect to happen
I want to get the result with page 2, but also get the result with page 1
How to reproduce
Also see "What happened"
Anything else
nothing
Version
v1.0.1
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: