Open ashwani-trivediat opened 3 days ago
The described steps are supposed to result in a CodeMismatchException
from Kotlin SDK. We will have to check if it is returning an incorrect exception type.
I looked into the error a bit more, looks like there is CodeMismatchException in the headers.
Here is the stack trace:
Error message is as follows:
{AttributeKey(aws.smithy.kotlin#ProtocolResponse)=DefaultHttpResponse(status=400: Bad Request, headers=aws.smithy.kotlin.runtime.http.engine.okhttp.OkHttpHeadersAdapter@f2c480f, body=aws.smithy.kotlin.runtime.http.content.ByteArrayContent@e69709c)}
aws.sdk.kotlin.services.cognitoidentityprovider.model.CognitoIdentityProviderException: Failed to parse response as 'awsJson1_1' error
Hope it helps.
Before opening, please confirm:
Language and Async Model
Kotlin
Amplify Categories
Authentication
Gradle script dependencies
Environment information
Please include any relevant guides or documentation you're referencing
https://docs.amplify.aws/gen1/android/build-a-backend/auth/manage-passwords/#reset-password
Describe the bug
Amplify SDK authentication version 2.19.1 seems to throw and generic error message if user types incorrect verificationCode while trying to reset password. Here are the steps:
On investigating the root cause it appears that inside
RealAWSCognitoAuthPlugin
whenever any type of error is encountered a generic error message is returned, here is the message: "There is a possibility that there is a bug if this error persists. Please take a look at \n" + "https://github.com/aws-amplify/amplify-android/issues to see if there are any existing issues that \n" + "match your scenario, and file an issue with the details of the bug if there isn't."; Following appears to be problematic code:Reproduction steps (if applicable)
No response
Code Snippet
Log output
amplifyconfiguration.json
No response
GraphQL Schema
Additional information and screenshots
No response