furaiev / amazon-cognito-identity-dart-2

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
186 stars 114 forks source link

Correctly throw SocketException #233

Closed Gummiees closed 1 year ago

Gummiees commented 1 year ago

If you disable the network, it should throw a SocketException, yet it throws Unknown Error. This is because e.toString() does not contain SocketException:. The value for e.toString() is:

Failed host lookup: 'cognito-idp.eu-west-1.amazonaws.com'

This should solve this issue: https://github.com/furaiev/amazon-cognito-identity-dart-2/issues/207

furaiev commented 1 year ago

@Gummiees thank you for your contribution. Available as of 3.4.0