mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-05-28 12:00:01 +02:00
#3515 use alert instead 500 for duplicated login source name
This commit is contained in:
parent
cd9b926af7
commit
99c2ae7b35
7 changed files with 47 additions and 23 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue