mirror of
https://github.com/gin-gonic/gin.git
synced 2025-05-22 20:49:23 +08:00
end up with 500 code at least when failed to encode response data
This commit is contained in:
parent
a481ee2897
commit
e59a68deb7
@ -926,7 +926,7 @@ func (c *Context) Render(code int, r render.Render) {
|
|||||||
if err := r.Render(c.Writer); err != nil {
|
if err := r.Render(c.Writer); err != nil {
|
||||||
// Pushing error to c.Errors
|
// Pushing error to c.Errors
|
||||||
_ = c.Error(err)
|
_ = c.Error(err)
|
||||||
c.Abort()
|
c.AbortWithStatus(500)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user