goharbor/harbor · error
invalid %s, shoud be one of %s, %s, %s, %s, %s
Error message
invalid %s, shoud be one of %s, %s, %s, %s, %s
What it means
Error "invalid %s, shoud be one of %s, %s, %s, %s, %s" thrown in goharbor/harbor.
Source
Thrown at src/lib/config/metadata/type.go:70
}
func (t *NonEmptyStringType) validate(str string) error {
if len(strings.TrimSpace(str)) == 0 {
return ErrStringValueIsEmpty
}
return nil
}
// AuthModeType ...
type AuthModeType struct {
StringType
}
func (t *AuthModeType) validate(str string) error {
if str == common.LDAPAuth || str == common.DBAuth || str == common.UAAAuth || str == common.HTTPAuth || str == common.OIDCAuth {
return nil
}
return fmt.Errorf("invalid %s, shoud be one of %s, %s, %s, %s, %s",
common.AUTHMode, common.DBAuth, common.LDAPAuth, common.UAAAuth, common.HTTPAuth, common.OIDCAuth)
}
// ProjectCreationRestrictionType ...
type ProjectCreationRestrictionType struct {
StringType
}
func (t *ProjectCreationRestrictionType) validate(str string) error {
if !(str == common.ProCrtRestrAdmOnly || str == common.ProCrtRestrEveryone) {
return fmt.Errorf("invalid %s, should be %s or %s",
common.ProjectCreationRestriction,
common.ProCrtRestrAdmOnly,
common.ProCrtRestrEveryone)
}
return nil
}
View on GitHub (pinned to 7b2fd08cc5)
When it happens
Trigger: Thrown at src/lib/config/metadata/type.go:70 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/9abd3ddc5746d402.
Report an issue: GitHub.