diefferson / http_certificate_pinning

Https Certificate pinning for Flutter
Apache License 2.0
83 stars 70 forks source link

fix: "NO_INTERNET" exception not shown bug in dio interceptor was fixed. #64

Open inanctelci opened 5 months ago

inanctelci commented 5 months ago

While there wasn't any internet connection, the interceptor was returning a CertificateCouldNotBeVerifiedException. Then Dio assumed that exception was an Unknown Exception. I fixed this bug by returning DioException.connectionError instead of CertificateCouldNotBeVerifiedException.