Feature Request: common approach to error taxonomies
- Dominant language
- Java
- Stars
- 1.4k
- Forks
- 326
- Avg merge
- 16h 22m
- Merged PRs (30d)
- 17
Description
Follup from this request to us https://github.com/square/okhttp/issues/6413
It would be great if Conscrypt (and eventually Android) allowed some form of Exception -> code for error mapping.
https://www.w3.org/TR/network-error-logging/#predefined-network-error-types
It's tough for us to do something like this in OkHttp because each provider has it's own errors. So we would end up with maintenance of observable Conscrypt heuristics like for checking whether the certs provided were just not in the local CA store, or expired, or invalid?
```
try {
sslSocket.startHandshake()
} catch (s: SSLHandshakeException) {
val r = generateSequence(s) { it.cause }.find { it is CertPathValidatorException } as? CertPathValidatorException
if (r != null) {
println(r.certPath.certificates.map { (it as X509Certificate).subjectDN })
}
}
```
Contributor guide
Assessment
This issue has not been assessed yet.