siyuan-note/siyuan · error
request bazaar package rating failed
Error message
request bazaar package rating failed
What it means
Fallback branch of the cloud envelope handling: result.Code is non-zero but the server supplied no Msg, so a generic "request bazaar package rating failed" error is returned instead of a specific message.
Solutions
- Retry and check kernel logs for the logged warning with details
- Update SiYuan client and verify cloud service health
- Capture the full response (e.g. via proxy/logs) if reporting the issue
Defensive patterns
Strategy: retry
Try / catch
try {
await api.getBazaarPackageRating(pkgType, pkg);
} catch (e) {
if (String(e.message) === "request bazaar package rating failed") {
// generic failure: log context, retry with backoff, then report
await sleep(retryDelay);
} else throw e;
} Prevention
- Keep client/server versions aligned so error envelopes include messages
- Avoid proxies that truncate or rewrite JSON bodies
- Include request context in logs for bug reports
When it happens
Trigger: Same business-failure conditions as the result.Msg branch (error 1077), but the server response omits the message field — older server versions, proxies truncating JSON, or internal errors without messages.
Common situations: Mismatched cloud server/client versions; intermediary proxies altering response bodies; server bugs returning error codes without text.
Related errors
- cloud server result message (result.Msg)
- result.Msg
- Conf.Language(31)
- Failed to obtain cloud info
- Field [ ] must not be empty
AI-assisted analysis of siyuan-note/siyuan@9f775e8a12 (2026-09-19).
Data as JSON: /api/errors/bec4c18b4f976552.
Report an issue: GitHub.
Appendix: source
Thrown at kernel/model/bazaar_rating.go:396
}
if http.StatusTooManyRequests == resp.StatusCode {
return ErrBazaarRatingRateLimited
}
if http.StatusOK != resp.StatusCode {
if body, readErr := resp.ToBytes(); nil == readErr {
_ = json.Unmarshal(body, &errorResult)
}
if http.StatusServiceUnavailable == resp.StatusCode && "bazaarPackagePending" == errorResult.Data.ErrorCode {
return ErrBazaarPackagePending
}
logging.LogWarnf("request bazaar package rating [%s] failed: HTTP %d", body["packageName"], resp.StatusCode)
return fmt.Errorf("request bazaar package rating failed: HTTP %d (%s)", resp.StatusCode, http.StatusText(resp.StatusCode))
}
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 9f775e8a12)