Skip to content

Commit

Permalink
reword error message for invalid auth config
Browse files Browse the repository at this point in the history
  • Loading branch information
bashar-515 committed Sep 17, 2024
1 parent b6d6f76 commit 4002453
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -928,7 +928,7 @@ func (config *AuthHandlerConfig) Validate(path string) error {
switch config.Type {
case rpc.CredentialsTypeAPIKey:
if len(config.Config) == 0 || config.Config == nil {
return errors.New("API key handler must contain at least 1 key")
return resource.NewConfigValidationError(fmt.Sprintf("%s.config", path), errors.New("At least 1 key required for API key handler"))
}
case rpc.CredentialsTypeExternal:
return errors.New("robot cannot issue external auth tokens")
Expand Down

0 comments on commit 4002453

Please sign in to comment.