amplify-cli
amplify-cli copied to clipboard
fix: remove error STRING_VALUE cannot be converted to an Integer (#12…
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 testpasses - [ ] 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.
Hello,
Will this PR ever be merged?
Hi, any updates on this PR? I am facing the issue and can't use the limit parameter.