wrap json parser into dedicated error : ErrInvalidJSON
This commit is contained in:
parent
c7aa87c660
commit
03d5e87c37
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue