aboutsummaryrefslogtreecommitdiffstats
path: root/routers/private/hook.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/private/hook.go')
-rw-r--r--routers/private/hook.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/private/hook.go b/routers/private/hook.go
index 853d3069ec..83c3f21b8f 100644
--- a/routers/private/hook.go
+++ b/routers/private/hook.go
@@ -173,7 +173,7 @@ func HookPreReceive(ctx *gitea_context.PrivateContext) {
protectBranch, err := models.GetProtectedBranchBy(repo.ID, branchName)
if err != nil {
log.Error("Unable to get protected branch: %s in %-v Error: %v", branchName, repo, err)
- ctx.JSON(500, map[string]interface{}{
+ ctx.JSON(http.StatusInternalServerError, map[string]interface{}{
"err": err.Error(),
})
return