UnderTreeTech/waterdrop

http middleware logger may convert normal status error to 500 ServerErr

UnderTreeTech opened this issue · 0 comments

Now the convert code as following, c.Errors.Last() return gin error, it will result a 500 ServerErr when convert error by ExtractStatus.

if len(c.Errors) > 0 {
    estatus = status.ExtractStatus(c.Errors.Last())
}