siyuan-note/siyuan · error

request bazaar package rating failed

Error message

request bazaar package rating failed

What it means

When the cloud envelope has result.Code != 0 but result.Msg is empty, requestBazaarPackageRating falls back to the generic message 'request bazaar package rating failed'. It means the cloud server reported an error without a human-readable explanation.

Source

Thrown at kernel/model/bazaar_rating.go:364

		logging.LogWarnf("request bazaar package rating failed: %s", err)
		return ErrFailedToConnectCloudServer
	}
	if http.StatusUnauthorized == resp.StatusCode {
		invalidUser()
		return errors.New(Conf.Language(31))
	}
	if http.StatusTooManyRequests == resp.StatusCode {
		return ErrBazaarRatingRateLimited
	}
	if http.StatusOK != resp.StatusCode {
		logging.LogWarnf("request bazaar package rating failed: %d", resp.StatusCode)
		return ErrFailedToConnectCloudServer
	}
	if 0 != result.Code {
		if "" != result.Msg {
			return errors.New(result.Msg)
		}
		return errors.New("request bazaar package rating failed")
	}
	*data = result.Data
	return nil
}

func isValidBazaarPackageType(pkgType string) bool {
	switch pkgType {
	case "plugins", "widgets", "icons", "templates", "themes":
		return true
	default:
		return false
	}
}

View on GitHub (pinned to 8641553a1f)

Solutions

  1. Inspect result.Code by instrumenting or checking kernel logs (logging.LogWarnf lines) for the underlying status
  2. Retry the request — some transient cloud errors return empty messages
  3. Verify you are on a current kernel version compatible with the current bazaar API
  4. Report/inspect the request server-side; without Msg the client cannot distinguish the failure cause
Defensive patterns

Strategy: retry

Try / catch

try {
  await api.getBazaarPackageRating(pkg);
} catch (e) {
  if (isGenericRatingFailure(e)) { await delay(2000); retryOnce(); }
  else { throw e; }
}

Prevention

When it happens

Trigger: Same as any result.Code != 0 cloud response (GetBazaarPackageRating / SetBazaarPackageRating), but the server omitted the Msg field in its JSON response.

Common situations: Older or misconfigured bazaar server versions that return bare error codes, proxy/gateway stripping the response body fields, or undocumented server error codes.

Related errors


AI-assisted analysis of siyuan-note/siyuan@8641553a1f (2026-09-11). Data as JSON: /api/errors/bec4c18b4f976552. Report an issue: GitHub.