1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-26 06:01:29 +00:00

Merge pull request #2712 from eyalpost/develop

incorrect error rendering (wrong status)
This commit is contained in:
astaxie 2017-06-16 13:34:28 +08:00 committed by GitHub
commit 805a674825

View File

@ -177,7 +177,7 @@ func jsonRenderer(value interface{}) Renderer {
func errorRenderer(err error) Renderer { func errorRenderer(err error) Renderer {
return rendererFunc(func(ctx *Context) { return rendererFunc(func(ctx *Context) {
ctx.Output.SetStatus(500) ctx.Output.SetStatus(500)
ctx.WriteString(err.Error()) ctx.Output.Body([]byte(err.Error()))
}) })
} }