siyuan-note/siyuan · warning

marketplace package ratings are unavailable

Error message

marketplace package ratings are unavailable

What it means

Error returned by model.GetInstalledBazaarPackageRatings (kernel/model/bazaar_rating.go:105) when bazaarRatingPublicPackageRatings (bazaar.GetBazaarPackageRatings) reports the public rating data as unavailable after the package names were already confirmed eligible on the marketplace. It marks the ratings subsystem being down or unreachable while the rest of the bazaar API works, so the batch call fails as a whole instead of returning partial data.

Source

Thrown at kernel/model/bazaar_rating.go:105

			continue
		}
		seen[packageName] = true
		names = append(names, packageName)
	}
	if 0 == len(names) {
		return map[string]*bazaar.PackageRating{}, []string{}, nil
	}

	eligiblePackageNames, err = bazaarRatingExistingPackageNames(ctx, pkgType, names)
	if nil != err {
		return nil, nil, err
	}
	if 0 == len(eligiblePackageNames) {
		return map[string]*bazaar.PackageRating{}, eligiblePackageNames, nil
	}
	ratings, available := bazaarRatingPublicPackageRatings(ctx, eligiblePackageNames)
	if !available {
		return nil, nil, errors.New("marketplace package ratings are unavailable")
	}
	return ratings, eligiblePackageNames, nil
}

// GetBazaarPackageRating 获取已安装官方包的公开评分和当前用户评分。
func GetBazaarPackageRating(ctx context.Context, pkgType, packageName string) (rating *bazaar.PackageRating,
	ratingAvailable bool, userRating int, err error) {
	token, err := bazaarRatingValidatePackage(ctx, pkgType, packageName)
	if nil != err {
		return nil, false, 0, err
	}

	data := bazaarPackageUserRatingData{}
	err = requestBazaarPackageRating(ctx, "/apis/siyuan/bazaar/getBazaarPackageRating", map[string]any{
		"token":       token,
		"packageName": packageName,
	}, &data)
	if nil != err {

View on GitHub (pinned to afa823b6b4)

Solutions

  1. Treat ratings as optional data: catch this error and degrade to a UI without rating stars instead of blocking the marketplace view
  2. Retry later; the unavailable state is server-side and resolves with the service
  3. Check general cloud connectivity (account sync endpoint) to distinguish a full outage from a ratings-only one
Defensive patterns

Strategy: fallback

Try / catch

ratings, eligible, err := model.GetInstalledBazaarPackageRatings(ctx, pkgType, names)
if err != nil && strings.Contains(err.Error(), "ratings are unavailable") {
    ratings, eligible = map[string]*bazaar.PackageRating{}, []string{} // render without stars
} else if err != nil {
    return err
}

Prevention

When it happens

Trigger: Calling /api/bazaar/getInstalledBazaarPackageRatings while the cloud rating data source is unreachable or returns no usable payload: outage of the ratings backend, CDN failure, or network paths that reach the marketplace metadata but not the ratings service.

Common situations: Bazaar browsing works but the rating panel errors out; regional network interference dropping specific cloud endpoints; transient outages right after a cloud deployment.

Related errors


AI-assisted analysis of siyuan-note/siyuan@afa823b6b4 (2026-08-18). Data as JSON: /api/errors/2909c4e77a80cf54. Report an issue: GitHub.