diff options
Diffstat (limited to 'models/error.go')
-rw-r--r-- | models/error.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/models/error.go b/models/error.go index cd7fa35d..69b29624 100644 --- a/models/error.go +++ b/models/error.go @@ -280,6 +280,18 @@ func (err ErrAccessTokenNotExist) Error() string { return fmt.Sprintf("access token does not exist [sha: %s]", err.SHA) } +type ErrAccessTokenEmpty struct { +} + +func IsErrAccessTokenEmpty(err error) bool { + _, ok := err.(ErrAccessTokenEmpty) + return ok +} + +func (err ErrAccessTokenEmpty) Error() string { + return fmt.Sprintf("access token is empty") +} + // ________ .__ __ .__ // \_____ \_______ _________ ____ |__|____________ _/ |_|__| ____ ____ // / | \_ __ \/ ___\__ \ / \| \___ /\__ \\ __\ |/ _ \ / \ |