mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 10:18:38 +00:00
unified API error response
This commit is contained in:
@@ -10,7 +10,6 @@ import (
|
||||
api "github.com/gogits/go-gogs-client"
|
||||
|
||||
"github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/modules/middleware"
|
||||
)
|
||||
|
||||
@@ -69,7 +68,7 @@ func GetUserInfo(ctx *middleware.Context) {
|
||||
if models.IsErrUserNotExist(err) {
|
||||
ctx.Error(404)
|
||||
} else {
|
||||
ctx.JSON(500, &base.ApiJsonErr{"GetUserByName: " + err.Error(), base.DOC_URL})
|
||||
ctx.APIError(500, "GetUserByName", err)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user