Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: limit query parameter parsing in auth admin api #13512

Merged
merged 3 commits into from
Jan 3, 2024

Conversation

sobolk
Copy link
Member

@sobolk sobolk commented Jan 2, 2024

Description of changes

This PR fixes an error where limit in Auth Admin API templates would be passed incorrectly to Cognito SDK as string whereas SDK expects number.

I.e. this error:

SerializationException: STRING_VALUE can not be converted to an Integer
    at throwDefaultError (/var/runtime/node_modules/@aws-sdk/smithy-client/dist-cjs/default-error-handler.js:8:22)
    at deserializeAws_json1_1ListUsersInGroupCommandError (/var/runtime/node_modules/@aws-sdk/client-cognito-identity-provider/dist-cjs/protocols/Aws_json1_1.js:5121:51)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /var/runtime/node_modules/@aws-sdk/middleware-serde/dist-cjs/deserializerMiddleware.js:7:24
    at async /var/runtime/node_modules/@aws-sdk/middleware-signing/dist-cjs/middleware.js:13:20
    at async StandardRetryStrategy.retry (/var/runtime/node_modules/@aws-sdk/middleware-retry/dist-cjs/StandardRetryStrategy.js:51:46)
    at async /var/runtime/node_modules/@aws-sdk/middleware-logger/dist-cjs/loggerMiddleware.js:6:22
    at async listUsersInGroup (/var/task/cognitoActions.js:231:20)
    at async /var/task/app.js:229:18 {

Issue #, if available

Description of how you validated changes

Added e2e tests that are calling Auth Admin API

Checklist

  • PR description included
  • yarn test passes
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)
  • New AWS SDK calls or CloudFormation actions have been added to relevant test and service IAM policies
  • Pull request labels are added

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@sobolk sobolk requested a review from a team as a code owner January 2, 2024 22:48
edwardfoyle
edwardfoyle previously approved these changes Jan 2, 2024
0618
0618 previously approved these changes Jan 3, 2024
Copy link
Contributor

@0618 0618 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for adding the test.

Just left some non-blocking nits and questions.

@sobolk sobolk merged commit 2480681 into aws-amplify:dev Jan 3, 2024
6 checks passed
@sobolk sobolk deleted the fix-limit-parsing branch January 3, 2024 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants