Skip to content

Commit

Permalink
When dynamic config is mis-specified say what key is incorrect (#371)
Browse files Browse the repository at this point in the history
I improved the error message that appears when you specify dynamic config incorrectly; the previous message  `Error: dynamic config value not in KEY=JSON_VAL format` isn't helpful when you're specifying more than a few values
  • Loading branch information
tdeebswihart authored Oct 25, 2023
1 parent 0d0a8a6 commit 6333773
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ func getDynamicConfigValues(input []string) (map[dynamicconfig.Key][]dynamicconf
for _, keyValStr := range input {
keyVal := strings.SplitN(keyValStr, "=", 2)
if len(keyVal) != 2 {
return nil, fmt.Errorf("dynamic config value not in KEY=JSON_VAL format")
return nil, fmt.Errorf("dynamic config value %s not in KEY=JSON_VAL format", keyValStr)
}
key := dynamicconfig.Key(keyVal[0])
// We don't support constraints currently
Expand Down

0 comments on commit 6333773

Please sign in to comment.