We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8a32e50 commit 1cc4859Copy full SHA for 1cc4859
modules/context/base.go
@@ -172,7 +172,7 @@ func (ctx *BaseContext) JSON(status int, content interface{}) {
172
ctx.Resp.WriteHeader(status)
173
if err := json.NewEncoder(ctx.Resp).Encode(content); err != nil {
174
log.Error("Render JSON failed: %v", err)
175
- ctx.Status(500)
+ ctx.Status(http.StatusInternalServerError)
176
}
177
178
@@ -182,7 +182,7 @@ func (ctx *BaseContext) PlainText(status int, bs []byte) {
182
ctx.Resp.Header().Set("Content-Type", "text/plain;charset=utf-8")
183
if _, err := ctx.Resp.Write(bs); err != nil {
184
log.Error("Render PlainText failed: %v", err)
185
186
187
188
0 commit comments