summaryrefslogtreecommitdiffstats
path: root/models/oauth2.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/oauth2.go')
-rw-r--r--models/oauth2.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/models/oauth2.go b/models/oauth2.go
index 10771d6a73..4da9800670 100644
--- a/models/oauth2.go
+++ b/models/oauth2.go
@@ -1,9 +1,6 @@
package models
-import (
- "errors"
- "fmt"
-)
+import "errors"
// OT: Oauth2 Type
const (
@@ -41,8 +38,7 @@ func GetOauth2(identity string) (oa *Oauth2, err error) {
return
}
if !exists {
- err = fmt.Errorf("not exists oauth2: %s", identity)
- return
+ return nil, ErrOauth2RecordNotExists
}
if oa.Uid == 0 {
return oa, ErrOauth2NotAssociatedWithUser