summaryrefslogtreecommitdiffstats
path: root/routers/swagger_json.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/swagger_json.go')
-rw-r--r--routers/swagger_json.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/routers/swagger_json.go b/routers/swagger_json.go
index 3ff1674f04..78c7fb1e24 100644
--- a/routers/swagger_json.go
+++ b/routers/swagger_json.go
@@ -5,6 +5,8 @@
package routers
import (
+ "net/http"
+
"code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/log"
@@ -19,6 +21,6 @@ func SwaggerV1Json(ctx *context.Context) {
ctx.Resp.Header().Set("Content-Type", "application/json")
if err := t.Execute(ctx.Resp, ctx.Data); err != nil {
log.Error("%v", err)
- ctx.Error(500)
+ ctx.Error(http.StatusInternalServerError)
}
}