Merge 7487f95687c9d4f0ba2476cf50b673282cf4c162 into c8af2768650c3ee5eb43ab774aa9169bd836c5a8

This commit is contained in:
Dan Slimmon 2017-06-27 21:42:21 +00:00 committed by GitHub
commit 72230392ee

View File

@ -442,7 +442,7 @@ func (c *Context) BindJSON(obj interface{}) error {
// See the binding package.
func (c *Context) BindWith(obj interface{}, b binding.Binding) error {
if err := b.Bind(c.Request, obj); err != nil {
c.AbortWithError(400, err).SetType(ErrorTypeBind)
c.Error(err).SetType(ErrorTypeBind)
return err
}
return nil