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
- Inspect result.Code by instrumenting or checking kernel logs (logging.LogWarnf lines) for the underlying status
- Retry the request — some transient cloud errors return empty messages
- Verify you are on a current kernel version compatible with the current bazaar API
- 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
- Retry transient-looking opaque cloud failures with backoff
- Log full request context (status, code) since the message carries no detail
- Check bazaar server status before assuming a client bug
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
- cloud server result message (result.Msg)
- requestResult.Msg
- result["msg"].(string)
- get block failed: %s
- get bazaar package failed: %s
AI-assisted analysis of siyuan-note/siyuan@8641553a1f (2026-09-11).
Data as JSON: /api/errors/bec4c18b4f976552.
Report an issue: GitHub.