diff --git a/context.go b/context.go index 5d3b6a4e..33721587 100644 --- a/context.go +++ b/context.go @@ -296,11 +296,7 @@ func (c *Context) BindJSON(obj interface{}) error { // BindWith binds the passed struct pointer using the specified binding engine. // 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) - return err - } - return nil + return b.Bind(c.Request, obj) } // ClientIP implements a best effort algorithm to return the real client IP, it parses