Use function argument in error message instead of return value (#11244)

* Do not use return value in error handling

* Revert changes to EpochFromString & SlotFromString

Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
Co-authored-by: Nishant Das <nishdas93@gmail.com>
This commit is contained in:
Justin Traglia
2022-08-18 09:01:24 -05:00
committed by GitHub
parent 4af7d8230a
commit a65c670f5e
2 changed files with 6 additions and 6 deletions

View File

@@ -88,7 +88,7 @@ func ExpandSingleEndpointIfFile(ctx *cli.Context, flag *cli.StringFlag) error {
default:
web3endpoint, err := file.ExpandPath(ctx.String(flag.Name))
if err != nil {
return errors.Wrapf(err, "could not expand path for %s", web3endpoint)
return errors.Wrapf(err, "could not expand path for %s", ctx.String(flag.Name))
}
if err := ctx.Set(flag.Name, web3endpoint); err != nil {
return errors.Wrapf(err, "could not set %s to %s", flag.Name, web3endpoint)