Commit 805a6748 authored by astaxie's avatar astaxie Committed by GitHub

Merge pull request #2712 from eyalpost/develop

incorrect error rendering (wrong status)
parents f2925978 8b504e7d
...@@ -177,7 +177,7 @@ func jsonRenderer(value interface{}) Renderer { ...@@ -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()))
}) })
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment