Skip to content

Commit

Permalink
better errors
Browse files Browse the repository at this point in the history
  • Loading branch information
erikgb committed Sep 3, 2024
1 parent 123b2f9 commit 77caf0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/zap/zap.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,11 @@ func stringToLevelEnablerHookFunc() mapstructure.DecodeHookFuncType {
// Level string not successfully parsed as a valid zap level string. Trying to parse int level.
iVal, err := strconv.Atoi(sVal)
if err != nil {
return nil, fmt.Errorf("invalid log logLevel \"%s\"", val)
return nil, fmt.Errorf("invalid level value \"%s\"", val)
}

if iVal < int(zap.DebugLevel) || iVal > int(zap.FatalLevel) {
return nil, fmt.Errorf("invalid log logLevel \"%s\"", val)
return nil, fmt.Errorf("invalid level value \"%s\"", val)
}

// #nosec G115
Expand Down

0 comments on commit 77caf0e

Please sign in to comment.