wrap json parser into dedicated error : ErrInvalidJSON

This commit is contained in:
Adrien Marquès 2020-03-20 22:26:43 +01:00
parent c7aa87c660
commit 03d5e87c37
Signed by: xdrm-brackets
GPG Key ID: D75243CA236D825E
1 changed files with 1 additions and 1 deletions

View File

@ -144,7 +144,7 @@ func (i *Set) parseJSON(req *http.Request) error {
if err == io.EOF {
return nil
}
return err
return fmt.Errorf("%s: %w", err, ErrInvalidJSON)
}
for name, param := range i.service.Form {