add the NO_VIABLE_PATH error

This commit is contained in:
Marten Seemann
2020-11-06 12:35:49 +07:00
parent 272229abf0
commit 96ac98a862
3 changed files with 6 additions and 0 deletions

View File

@@ -27,6 +27,7 @@ const (
CryptoBufferExceeded ErrorCode = 0xd
KeyUpdateError ErrorCode = 0xe
AEADLimitReached ErrorCode = 0xf
NoViablePathError ErrorCode = 0x10
)
func (e ErrorCode) isCryptoError() bool {
@@ -83,6 +84,8 @@ func (e ErrorCode) String() string {
return "KEY_UPDATE_ERROR"
case AEADLimitReached:
return "AEAD_LIMIT_REACHED"
case NoViablePathError:
return "NO_VIABLE_PATH"
default:
if e.isCryptoError() {
return fmt.Sprintf("CRYPTO_ERROR (%#x)", uint16(e))