mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-03 13:04:08 +02:00
#3515 use alert instead 500 for duplicated login source name
This commit is contained in:
1 parent
cd9b926af7
commit
99c2ae7b35
7 files changed
+47
-23
No files matched your search
@@ -21,7 +21,7 @@ func parseLoginSource(ctx *context.APIContext, u *models.User, sourceID int64, l
|
||||
|
||||
source, err := models.GetLoginSourceByID(sourceID)
|
||||
if err != nil {
|
||||
if models.IsErrAuthenticationNotExist(err) {
|
||||
if models.IsErrLoginSourceNotExist(err) {
|
||||
ctx.Error(422, "", err)
|
||||
} else {
|
||||
ctx.Error(500, "GetLoginSourceByID", err)
|
||||
|
||||
Reference in new issue
Block a user