silence all those quic errors

This commit is contained in:
Alex Grintsvayg 2020-10-06 10:11:36 -04:00
parent a0f78028cc
commit 2b3581a692
No known key found for this signature in database
GPG key ID: AEB3F089F86A22B5

View file

@ -87,6 +87,7 @@ const (
errInvalidCharacter = "invalid_character" errInvalidCharacter = "invalid_character"
errBlobNotFound = "blob_not_found" errBlobNotFound = "blob_not_found"
errNoErr = "no_error" errNoErr = "no_error"
errQuicProto = "quic_protocol_violation"
errOther = "other" errOther = "other"
) )
@ -187,6 +188,8 @@ func TrackError(direction string, e error) (shouldLog bool) { // shouldLog is a
errType = errBlobNotFound errType = errBlobNotFound
} else if strings.Contains(err.Error(), "0-byte blob received") { } else if strings.Contains(err.Error(), "0-byte blob received") {
errType = errZeroByteBlob errType = errZeroByteBlob
} else if strings.Contains(err.Error(), "QuicError PROTOCOL_VIOLATION") {
errType = errQuicProto
} else if strings.Contains(err.Error(), "invalid character") { } else if strings.Contains(err.Error(), "invalid character") {
errType = errInvalidCharacter errType = errInvalidCharacter
} else if _, ok := e.(*json.SyntaxError); ok { } else if _, ok := e.(*json.SyntaxError); ok {