Skip to content

Commit

Permalink
Clarify error message (#4524)
Browse files Browse the repository at this point in the history
Signed-off-by: Danny Kopping <danny.kopping@grafana.com>
  • Loading branch information
Danny Kopping authored Oct 21, 2021
1 parent 2b5f300 commit cc1d478
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion clients/pkg/promtail/targets/manager.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package targets

import (
"fmt"

"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/pkg/errors"
Expand Down Expand Up @@ -80,7 +82,7 @@ func NewTargetManagers(
targetScrapeConfigs[WindowsEventsConfigs] = append(targetScrapeConfigs[WindowsEventsConfigs], cfg)

default:
return nil, errors.New("unknown scrape config")
return nil, fmt.Errorf("no valid target scrape config defined for %q", cfg.JobName)
}
}

Expand Down

0 comments on commit cc1d478

Please sign in to comment.