siyuan-note/siyuan · warning

marketplace package ratings are unavailable

Error message

marketplace package ratings are unavailable

What it means

GetInstalledBazaarPackageRatings returns this error when the public rating service reports that ratings are unavailable (bazaar.GetBazaarPackageRatings returns available=false), meaning it cannot fetch public ratings for the eligible packages at all. It signals a global unavailability of the ratings data source, not a problem with specific packages.

Solutions

  1. Retry later once the marketplace rating service is reachable again
  2. Check network connectivity to the cloud server
  3. Fall back to rendering packages without ratings in the UI
Defensive patterns

Strategy: fallback

Try / catch

// Go
ratings, names, err := model.GetInstalledBazaarPackageRatings(ctx, pkgType, pkgs)
if err != nil {
    log.Warnf("ratings unavailable, rendering without ratings: %v", err)
    ratings = map[string]*bazaar.PackageRating{}
}

Prevention

When it happens

Trigger: Calling GetInstalledBazaarPackageRatings with at least one eligible installed official package while bazaar.GetBazaarPackageRatings reports the ratings cache/service as unavailable.

Common situations: Cloud/marketplace rating service outage; ratings index not yet built or downloaded on this instance; connectivity issues preventing the ratings bundle from loading.

Understand the failure class

Background: "empty response", "returned no data", "empty embeddings": what HTTP 200-with-empty-body errors mean across libraries — this error's family across 36 libraries.

Related errors


AI-assisted analysis of siyuan-note/siyuan@9f775e8a12 (2026-09-19). Data as JSON: /api/errors/2909c4e77a80cf54. Report an issue: GitHub.

Appendix: source

Thrown at kernel/model/bazaar_rating.go:85

// ErrBazaarRatingRateLimited 表示评分请求受到云端频率限制。
var ErrBazaarRatingRateLimited = errors.New("bazaar rating rate limited")

// ErrBazaarPackagePending 表示云端尚未同步包信息。
var ErrBazaarPackagePending = errors.New("bazaar package information has not synced yet")

// GetInstalledBazaarPackageRatings 获取指定已安装包的公开评分。
func GetInstalledBazaarPackageRatings(ctx context.Context, pkgType string,
	packageNames []string) (ratings map[string]*bazaar.PackageRating, eligiblePackageNames []string, err error) {
	eligiblePackageNames, err = getInstalledOfficialBazaarPackageNames(ctx, pkgType, packageNames)
	if nil != err {
		return nil, nil, err
	}
	if 0 == len(eligiblePackageNames) {
		return map[string]*bazaar.PackageRating{}, []string{}, nil
	}
	ratings, available := bazaarRatingPublicPackageRatings(ctx, eligiblePackageNames)
	if !available {
		return nil, nil, errors.New("marketplace package ratings are unavailable")
	}
	return ratings, eligiblePackageNames, nil
}

// GetInstalledBazaarPackageUserRatings 获取指定已安装官方包的当前用户评分。
func GetInstalledBazaarPackageUserRatings(ctx context.Context, pkgType string,
	packageNames []string) (userRatings map[string]int, eligiblePackageNames []string, err error) {
	if !isValidBazaarPackageType(pkgType) {
		return nil, nil, errors.New("invalid package type")
	}
	if bazaarPackageRatingBatchSize < len(packageNames) {
		return nil, nil, errors.New("too many package names")
	}
	token, err := bazaarRatingUserToken()
	if nil != err {
		return nil, nil, err
	}
	eligiblePackageNames, err = getInstalledOfficialBazaarPackageNames(ctx, pkgType, packageNames)

View on GitHub (pinned to 9f775e8a12)