Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Merge pull request #282 from arielshaqed/patch-1
Browse files Browse the repository at this point in the history
Wrap decodehook errors when reporting
  • Loading branch information
mitchellh authored Apr 21, 2022
2 parents ab69d8d + 3518e19 commit 3908fe7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mapstructure.go
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ func (d *Decoder) decode(name string, input interface{}, outVal reflect.Value) e
var err error
input, err = DecodeHookExec(d.config.DecodeHook, inputVal, outVal)
if err != nil {
return fmt.Errorf("error decoding '%s': %s", name, err)
return fmt.Errorf("error decoding '%s': %w", name, err)
}
}

Expand Down

0 comments on commit 3908fe7

Please sign in to comment.