add the KEY_UPDATE_ERROR error code

This commit is contained in:
Marten Seemann
2020-09-10 18:14:04 +07:00
parent c5a132f158
commit 10797cfc79
2 changed files with 5 additions and 0 deletions

View File

@@ -25,6 +25,7 @@ const (
InvalidToken ErrorCode = 0xb
ApplicationError ErrorCode = 0xc
CryptoBufferExceeded ErrorCode = 0xd
KeyUpdateError ErrorCode = 0xe
)
func (e ErrorCode) isCryptoError() bool {
@@ -77,6 +78,8 @@ func (e ErrorCode) String() string {
return "APPLICATION_ERROR"
case CryptoBufferExceeded:
return "CRYPTO_BUFFER_EXCEEDED"
case KeyUpdateError:
return "KEY_UPDATE_ERROR"
default:
if e.isCryptoError() {
return "CRYPTO_ERROR"