ux: Improve error message when endpoint is invalid
@@ -2,6 +2,7 @@ package config
import (
"errors"
+ "fmt"
"log"
"os"
"time"
@@ -267,7 +268,7 @@ func validateEndpointsConfig(config *Config) error {
log.Printf("[config][validateEndpointsConfig] Validating endpoint '%s'", endpoint.Name)
}
if err := endpoint.ValidateAndSetDefaults(); err != nil {
- return err
+ return fmt.Errorf("invalid endpoint %s: %s", endpoint.DisplayName(), err)
}
}
log.Printf("[config][validateEndpointsConfig] Validated %d endpoints", len(config.Endpoints))
