aboutsummaryrefslogtreecommitdiff
path: root/internal/db/access_tokens.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/db/access_tokens.go')
-rw-r--r--internal/db/access_tokens.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/internal/db/access_tokens.go b/internal/db/access_tokens.go
index 58f77858..9dab65d4 100644
--- a/internal/db/access_tokens.go
+++ b/internal/db/access_tokens.go
@@ -9,6 +9,7 @@ import (
"fmt"
"time"
+ "github.com/pkg/errors"
gouuid "github.com/satori/go.uuid"
"gorm.io/gorm"
@@ -130,8 +131,10 @@ type ErrAccessTokenNotExist struct {
args errutil.Args
}
+// IsErrAccessTokenNotExist returns true if the underlying error has the type
+// ErrAccessTokenNotExist.
func IsErrAccessTokenNotExist(err error) bool {
- _, ok := err.(ErrAccessTokenNotExist)
+ _, ok := errors.Cause(err).(ErrAccessTokenNotExist)
return ok
}