goharbor/harbor · error
failed to validate configuration
Error message
failed to validate configuration
What it means
Error "failed to validate configuration" thrown in goharbor/harbor.
Source
Thrown at src/controller/config/controller.go:94
return configs, nil
}
func (c *controller) UpdateUserConfigs(ctx context.Context, conf map[string]any) error {
if readOnlyForAll {
return errors.ForbiddenError(nil).WithMessage("current config is init by env variable: CONFIG_OVERWRITE_JSON, it cannot be updated")
}
mgr := config.GetCfgManager(ctx)
err := mgr.Load(ctx)
if err != nil {
return err
}
err = c.validateCfg(ctx, conf)
if err != nil {
return err
}
if err := mgr.UpdateConfig(ctx, conf); err != nil {
log.Errorf("failed to upload configurations: %v", err)
return fmt.Errorf("failed to validate configuration")
}
// update the audit logger to point to the new endpoint
return c.updateLogEndpoint(ctx, conf)
}
func (c *controller) updateLogEndpoint(ctx context.Context, cfgs map[string]any) error {
// check if the audit log forward endpoint updated
if _, ok := cfgs[common.AuditLogForwardEndpoint]; ok {
auditEP := config.AuditLogForwardEndpoint(ctx)
if len(auditEP) == 0 {
return nil
}
if !audit.CheckEndpointActive(auditEP) {
return errors.BadRequestError(fmt.Errorf("could not connect to the audit endpoint: %v", auditEP))
}
audit.LogMgr.Init(ctx, auditEP)
}
return nilView on GitHub (pinned to 7b2fd08cc5)
When it happens
Trigger: Thrown at src/controller/config/controller.go:94 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of goharbor/harbor@7b2fd08cc5 (2026-08-16).
Data as JSON: /api/errors/f74ae4cdc4c08a0a.
Report an issue: GitHub.