diff --git a/aws-auth-cognito/src/main/java/com/amplifyframework/auth/cognito/actions/SRPCognitoActions.kt b/aws-auth-cognito/src/main/java/com/amplifyframework/auth/cognito/actions/SRPCognitoActions.kt index e4d350517f..7efd3cba7b 100644 --- a/aws-auth-cognito/src/main/java/com/amplifyframework/auth/cognito/actions/SRPCognitoActions.kt +++ b/aws-auth-cognito/src/main/java/com/amplifyframework/auth/cognito/actions/SRPCognitoActions.kt @@ -242,12 +242,13 @@ internal object SRPCognitoActions : SRPActions { SRPEvent(SRPEvent.EventType.RetryRespondPasswordVerifier(challengeParams, metadata, session)) } else { val errorEvent = SRPEvent(SRPEvent.EventType.ThrowPasswordVerifierError(e)) - logger.verbose("$id Sending event ${errorEvent.type}") dispatcher.send(errorEvent) + val errorEvent2 = SignInEvent(SignInEvent.EventType.ThrowError(e)) logger.verbose("$id Sending event ${errorEvent.type}") dispatcher.send(errorEvent2) + AuthenticationEvent(AuthenticationEvent.EventType.CancelSignIn()) } }