We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have a case that should fire the exception CertificateNotVerifiedException, also the logic is handled under that specific exception type
CertificateNotVerifiedException
if (err.error is CertificateNotVerifiedException) { fireSSLNotMatchException(); return super.onError(err, handler); }
in android, this exception is fired as expected, here is the log:
E/flutter ( 7061): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(CONNECTION_NOT_SECURE, Connection is not secure, Fingerprint doesn't match, null) E/flutter ( 7061): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:653:7) E/flutter ( 7061): #1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:315:18) E/flutter ( 7061): <asynchronous suspension> E/flutter ( 7061): #2 HttpCertificatePinning.check (package:http_certificate_pinning/src/http_certificate_pinning.dart:35:19) E/flutter ( 7061): <asynchronous suspension> E/flutter ( 7061): #3 CertificatePinningInterceptor.onRequest (package:http_certificate_pinning/src/dio/certificate_pinning_interceptor.dart:46:28) E/flutter ( 7061): <asynchronous suspension> E/flutter ( 7061):
Note that here, the exceptionCode is CONNECTION_NOT_SECURE, the returned exception object is CertificateNotVerifiedException
CONNECTION_NOT_SECURE
while in iOS, the fired exception is different; here is the log:
flutter: [VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(CONNECTION_INSECURE, null, null, null) #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:653:7) #1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:315:18) <asynchronous suspension> #2 HttpCertificatePinning.check (package:http_certificate_pinning/src/http_certificate_pinning.dart:35:19) <asynchronous suspension> #3 CertificatePinningInterceptor.onRequest (package:http_certificate_pinning/src/dio/certificate_pinning_interceptor.dart:46:28) <asynchronous suspension>
the exceptionCode here is CONNECTION_INSECURE, also the returned exception object is CertificateCouldNotBeVerifiedException
CONNECTION_INSECURE
CertificateCouldNotBeVerifiedException
so I believe that these should be unified.
The text was updated successfully, but these errors were encountered:
Thanks for this observation, exception unified on release 2.1.1
Sorry, something went wrong.
No branches or pull requests
I have a case that should fire the exception
CertificateNotVerifiedException
, also the logic is handled under that specific exception typein android, this exception is fired as expected, here is the log:
Note that here, the exceptionCode is
CONNECTION_NOT_SECURE
, the returned exception object isCertificateNotVerifiedException
while in iOS, the fired exception is different; here is the log:
the exceptionCode here is
CONNECTION_INSECURE
, also the returned exception object isCertificateCouldNotBeVerifiedException
so I believe that these should be unified.
The text was updated successfully, but these errors were encountered: