From 4aa4341caee289bce24c9d5fd2f8c8a87d39c3cf Mon Sep 17 00:00:00 2001 From: Kim Lindhardt Madsen Date: Wed, 21 Oct 2015 09:49:07 +0200 Subject: [PATCH] merged with original develop --- routers/api/v1/repo.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routers/api/v1/repo.go b/routers/api/v1/repo.go index 8f351068d..b36e94504 100644 --- a/routers/api/v1/repo.go +++ b/routers/api/v1/repo.go @@ -199,7 +199,7 @@ func ForkRepo(ctx *middleware.Context) { if models.IsErrRepoAlreadyExist(err) || models.IsErrNameReserved(err) || models.IsErrNamePatternNotAllowed(err) { - ctx.JSON(422, &base.ApiJsonErr{err.Error(), base.DOC_URL}) + ctx.APIError(422, "ForkRepository", err) } else { log.Error(4, "ForkRepository: %v", err) if forkedRepo != nil {