Skip to content

Commit 380e244

Browse files
author
urihoenig
authored
Merge pull request #562 from v3io/development
clearer error msg (#561)
2 parents 00b2fd6 + 57ef0f7 commit 380e244

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pkg/utils/validators.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ func IsValidMetricName(name string) error {
2222
}
2323

2424
if !metricNameValidationRegex.Match([]byte(trimmed)) {
25-
return fmt.Errorf("metric name contains illegal characters. Name should conform to '%s'",
26-
metricNameValidationRegexStr)
25+
return fmt.Errorf("metric name contains illegal characters. Name '%s' should conform to '%s'",
26+
trimmed, metricNameValidationRegexStr)
2727
}
2828

2929
return nil
@@ -36,8 +36,8 @@ func IsValidLabelName(labelName string) error {
3636
}
3737

3838
if !labelValidationRegex.Match([]byte(trimmed)) {
39-
return fmt.Errorf("label name contains illegal characters. Label name should conform to '%s'",
40-
labelValidationRegexStr)
39+
return fmt.Errorf("label name contains illegal characters. Label name '%s' should conform to '%s'",
40+
trimmed, labelValidationRegexStr)
4141
}
4242

4343
return nil

0 commit comments

Comments
 (0)