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-......'}
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?