From dc34d9a81a7a27cb7be3f15049ec62d9f8e276ba Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Fri, 20 Mar 2020 22:35:30 +0100 Subject: [PATCH] wrap multipart errors in dedicated error : ErrInvalidMultipart --- internal/reqdata/set.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/reqdata/set.go b/internal/reqdata/set.go index 0c6ac67..c09ab83 100644 --- a/internal/reqdata/set.go +++ b/internal/reqdata/set.go @@ -228,7 +228,7 @@ func (i *Set) parseMultipart(req *http.Request) error { // 2. parse multipart if err = mpr.Parse(); err != nil { - return err + return fmt.Errorf("%s: %w", err, ErrInvalidMultipart) } for name, param := range i.service.Form {