refactor(errorsx): autogenerate all failure names (#474)
Part of https://github.com/ooni/probe/issues/1591
This commit is contained in:
parent
8b38ea7e98
commit
5c217594d7
8 changed files with 69 additions and 56 deletions
|
|
@ -107,7 +107,7 @@ func classifyQUICFailure(err error) string {
|
|||
var transportError *quic.TransportError
|
||||
|
||||
if errors.As(err, &versionNegotiation) {
|
||||
return FailureNoCompatibleQUICVersion
|
||||
return FailureQUICIncompatibleVersion
|
||||
}
|
||||
if errors.As(err, &statelessReset) {
|
||||
return FailureConnectionReset
|
||||
|
|
@ -130,7 +130,7 @@ func classifyQUICFailure(err error) string {
|
|||
// TLSAlertDecryptError and TLSAlertHandshakeFailure are summarized to a FailureSSLHandshake error because both
|
||||
// alerts are caused by a failed or corrupted parameter negotiation during the TLS handshake.
|
||||
if errCode == quicTLSAlertDecryptError || errCode == quicTLSAlertHandshakeFailure {
|
||||
return FailureSSLHandshake
|
||||
return FailureSSLFailedHandshake
|
||||
}
|
||||
if errCode == quicTLSAlertUnknownCA {
|
||||
return FailureSSLUnknownAuthority
|
||||
|
|
|
|||
Loading…
Reference in a new issue