amazon-archives / amazon-cognito-auth-js

The Amazon Cognito Auth SDK for JavaScript simplifies adding sign-up, sign-in with user profile functionality to web apps.
Apache License 2.0
424 stars 232 forks source link

Pre-signup trigger output #207

Open angsm opened 4 years ago

angsm commented 4 years ago

Hi, May I know if its possible in the Pre-SignUp trigger, to catch the error in validationData from Cognito if it outputs an error message (like "user already exist"). Or at least how the error would look like in the events or context object.

To prevent the trigger from continuing the code if Cognito sends an error.

Thank you Shimin A