Skip to content

Commit

Permalink
fix: Add info to error when value is invalid (#117)
Browse files Browse the repository at this point in the history
  • Loading branch information
obalunenko authored Sep 18, 2023
1 parent 9a152a9 commit e7d7bf6
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions getenv.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,6 @@ func Env[T internal.EnvParsable](key string, options ...option.Option) (T, error
return t, fmt.Errorf("failed to get environment variable[%s]: %w", key, ErrNotSet)
}

if errors.Is(err, internal.ErrInvalidValue) {
return t, fmt.Errorf("failed to parse environment variable[%s]: %w", key, ErrInvalidValue)
}

return t, fmt.Errorf("failed to parse environment variable[%s]: %w", key, err)
}

Expand Down

0 comments on commit e7d7bf6

Please sign in to comment.