goharbor/harbor · error

resource not support

Error message

resource %s not support

What it means

Sentinel validation in the project quota driver's Validate: a hard limit was supplied for a resource type other than storage, the only resource the project driver supports. Raised when creating/updating a project quota with an unsupported resource key.

Solutions

  1. Only set the storage resource in project quota hard limits
  2. Remove count/other resource keys from the quota request
  3. Use the correct driver if another resource type is genuinely needed
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/controller/quota/driver/project/project.go:92 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/9b2244d41ec2e1da. Report an issue: GitHub.

Appendix: source

Thrown at src/controller/quota/driver/project/project.go:92

	if !ok {
		return nil, fmt.Errorf("bad result for project: %s", key)
	}

	return dr.QuotaRefObject{
		"id":         project.ProjectID,
		"name":       project.Name,
		"owner_name": project.OwnerName,
	}, nil
}

func (d *driver) Validate(hardLimits types.ResourceList) error {
	resources := map[types.ResourceName]bool{
		types.ResourceStorage: true,
	}

	for resource, value := range hardLimits {
		if !resources[resource] {
			return fmt.Errorf("resource %s not support", resource)
		}

		if err := lib.ValidateQuotaLimit(value); err != nil {
			return err
		}
	}

	for resource := range resources {
		if _, found := hardLimits[resource]; !found {
			return fmt.Errorf("resource %s not found", resource)
		}
	}

	return nil
}

func (d *driver) CalculateUsage(ctx context.Context, key string) (types.ResourceList, error) {
	projectID, err := strconv.ParseInt(key, 10, 64)

View on GitHub (pinned to 7b2fd08cc5)