amplify-cli icon indicating copy to clipboard operation
amplify-cli copied to clipboard

fix: remove error STRING_VALUE cannot be converted to an Integer (#12…

Open marcomilon opened this issue 2 years ago • 2 comments

Description of changes

Issue:

When calling the AdminQueries lambda function with the limit parameter, it returns a 500 error because the limit parameter cannot be converted to an integer.

Fix:

Update the code used to generate the AdminQueries lambda function by parsing the limit parameter to return an integer.

Change in this PR:

Added parseInt to packages/amplify-category-auth/resources/adminAuth/admin-auth-cognitoActions.js when using the Limit parameter.

Issue #, if available

Description of how you validated changes

I created a sample app and tested the following paths on the AdminQueries lambda function using the limit parameter:

  • listUsers
  • listGroups
  • listGroupsForUser
  • listUsersInGroup

They work as expected after applying my fix return the correct response with http code 200.

Checklist

  • [x] PR description included
  • [x] 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.

marcomilon avatar Aug 27 '23 00:08 marcomilon

Hello,

Will this PR ever be merged?

marcomilon avatar Nov 17 '23 18:11 marcomilon

Hi, any updates on this PR? I am facing the issue and can't use the limit parameter.

fabianf92 avatar May 04 '24 20:05 fabianf92