From aff49b1c9eaa33f7c530275f2695d6d96699ec5d Mon Sep 17 00:00:00 2001 From: Unknwon Date: Thu, 8 Oct 2015 20:36:07 -0400 Subject: unified API error response --- routers/api/v1/user.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'routers/api/v1/user.go') 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 } -- cgit v1.2.3