goharbor/harbor · error · errors.Error

BAD_REQUEST

BAD_REQUEST

Error message

the value of "base" query can only be exact match value with "*"

What it means

Error "the value of "base" query can only be exact match value with "*"" thrown in goharbor/harbor.

Source

Thrown at src/pkg/artifact/dao/dao.go:374

}

// handle q=base=*
// when "q=base=*" is specified in the query, the base collection is the all artifacts of database,
// otherwise the base collection is only the tagged artifacts and untagged artifacts that aren't
// referenced by others
func setBaseQuery(qs beegoorm.QuerySeter, query *q.Query) (beegoorm.QuerySeter, error) {
	if query == nil || len(query.Keywords) == 0 {
		qs = qs.FilterRaw("id", both)
		return qs, nil
	}
	base, exist := query.Keywords["base"]
	if !exist {
		qs = qs.FilterRaw("id", both)
		return qs, nil
	}
	b, ok := base.(string)
	if !ok || b != "*" {
		return qs, errors.New(nil).WithCode(errors.BadRequestCode).
			WithMessage(`the value of "base" query can only be exact match value with "*"`)
	}
	// the base is specified as "*"
	return qs, nil
}

// handle query string: q=tags=value q=tags=~value
func setTagQuery(ctx context.Context, qs beegoorm.QuerySeter, query *q.Query) (beegoorm.QuerySeter, error) {
	if query == nil || len(query.Keywords) == 0 {
		return qs, nil
	}
	tags, exist := query.Keywords["tags"]
	if !exist {
		tags, exist = query.Keywords["Tags"]
		if !exist {
			return qs, nil
		}
	}

View on GitHub (pinned to 7b2fd08cc5)

When it happens

Trigger: Thrown at src/pkg/artifact/dao/dao.go:374 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/915a7a9119c63717. Report an issue: GitHub.