mirror of
https://github.com/go-gitea/gitea
synced 2025-07-19 16:58:37 +00:00
#3515 use alert instead 500 for duplicated login source name
This commit is contained in:
@@ -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