jonsaw / amazon-cognito-identity-dart

Unofficial Amazon Cognito Identity Provider Dart SDK, to easily add user sign-up and sign-in to your mobile and web apps with AWS.
MIT License
204 stars 93 forks source link

CognitoClientException not throwing proper exception #81

Open Sujal1 opened 3 years ago

Sujal1 commented 3 years ago

Sometimes when I try to authenticate user, with my network turned off, I get the following error (and it takes around 1-2 minutes to get this error): CognitoClientException {statusCode: null, code: Unknown error, name: null, message: Unknown Error}

Then again, if I try immediately, I get the following error (as desired): CognitoClientException{statusCode: null, code: NetworkError, name: null, message: Failed host lookup: 'cognito-......'}

How can this Unknown error be resolved?