diff options
author | Unknwon <u@gogs.io> | 2015-10-08 20:36:07 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-10-08 20:36:07 -0400 |
commit | aff49b1c9eaa33f7c530275f2695d6d96699ec5d (patch) | |
tree | c3720601db2e005e57032feb42deac7e347ac713 /routers/api/v1/user.go | |
parent | b1941f1da18b8c6ca046771c21f21ba793765518 (diff) |
unified API error response
Diffstat (limited to 'routers/api/v1/user.go')
-rw-r--r-- | routers/api/v1/user.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/routers/api/v1/user.go b/routers/api/v1/user.go index 57bf68bb..f27cd3ae 100644 --- a/routers/api/v1/user.go +++ b/routers/api/v1/user.go @@ -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 } |