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
InvalidLambdaResponseException: Invalid lambda function output : Invalid JSON when user not found in pool #13352
Comments
Hello, @saharJ95 👋 and sorry to hear you're running into this. We may need a little more information on the steps you took to set up Auth to determine why this error is happening. Are you trying to use a custom lambda to send back a message when a user is not in the user pool? Can you share the lambda code, which of the Auth lambdas are causing this, and a little more context there? Also, if you log in with an existing user is everything working just fine? |
Hi @cwomack ,
Existing users work fine, I am trying to catch the exceptions although if the useremail or password is incorrect I am getting the correct response from Cognito APIs |
hello @saharJ95 . Could you please provide the following information:
This will help us to determine the root cause of the issue. Usually the |
Hi @israx ,
Furthermore, |
Hello @saharJ95 . Thank you for providing all the feedback. I see you have set a
So the reason you are getting the In order to solve your issue you could do the following:
I highly recommend not disabling the |
Hi @israx , Thanks :) |
Before opening, please confirm:
JavaScript Framework
React
Amplify APIs
Authentication
Amplify Version
v6
Amplify Categories
auth
Backend
None
Environment information
Describe the bug
Using Cognito User Pool
Getting InvalidLambdaResponseException: Invalid lambda function output : Invalid JSON when the user doesnot exisit in pool or deleted
Expected behavior
Response should be User not Found with defined code
Reproduction steps
login with non exsisting users
Code Snippet
Log output
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response
The text was updated successfully, but these errors were encountered: