From e5818146a84bb4c7211a7b7eb0edc08b6f6050cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Schw=C3=B6rer?= Date: Tue, 23 Jul 2024 14:21:03 +0200 Subject: [PATCH] v0.0.489 --- cursortoken/token.go | 6 +++--- goextVersion.go | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cursortoken/token.go b/cursortoken/token.go index f3f95bb..0483720 100644 --- a/cursortoken/token.go +++ b/cursortoken/token.go @@ -3,8 +3,8 @@ package cursortoken import ( "encoding/base32" "encoding/json" - "errors" "go.mongodb.org/mongo-driver/bson/primitive" + "gogs.mikescher.com/BlackForestBytes/goext/exerr" "strings" "time" ) @@ -127,7 +127,7 @@ func Decode(tok string) (CursorToken, error) { } if !strings.HasPrefix(tok, "tok_") { - return CursorToken{}, errors.New("could not decode token, missing prefix") + return CursorToken{}, exerr.New(exerr.TypeCursorTokenDecode, "could not decode token, missing prefix").Str("token", tok).Build() } body, err := base32.StdEncoding.DecodeString(tok[len("tok_"):]) @@ -138,7 +138,7 @@ func Decode(tok string) (CursorToken, error) { var tokenDeserialize cursorTokenSerialize err = json.Unmarshal(body, &tokenDeserialize) if err != nil { - return CursorToken{}, err + return CursorToken{}, exerr.Wrap(err, "failed to deserialize token").Str("token", tok).Build() } token := CursorToken{Mode: CTMNormal} diff --git a/goextVersion.go b/goextVersion.go index 04b7716..41cce2e 100644 --- a/goextVersion.go +++ b/goextVersion.go @@ -1,5 +1,5 @@ package goext -const GoextVersion = "0.0.488" +const GoextVersion = "0.0.489" -const GoextVersionTimestamp = "2024-07-22T15:16:28+0200" +const GoextVersionTimestamp = "2024-07-23T14:21:03+0200"