siyuan-note/siyuan · error
get rhy result failed: %d
Error message
get rhy result failed: %d
What it means
getRhyResult0 fetches version/bazaar metadata from SiYuan's rhy backend service and caches the result. When the HTTP response status is not 200, the function logs the status code and returns this error instead of the parsed payload. It means the remote metadata endpoint answered, but rejected the request or reported a server-side problem.
Source
Thrown at kernel/util/rhy.go:86
}
ret := v.(map[string]any)
syncRhyBazaarHashFromResult(ret)
return ret, nil
}
func getRhyResult0(ctx context.Context) (map[string]any, error) {
rhyResultLock.Lock()
defer rhyResultLock.Unlock()
request := httpclient.NewCloudRequest30s()
resp, err := request.SetContext(ctx).SetSuccessResult(&cachedRhyResult).Get(GetCloudServer() + "/apis/siyuan/version?ver=" + Ver)
if err != nil {
logging.LogErrorf("get version info failed: %s", err)
return nil, err
}
if 200 != resp.StatusCode {
logging.LogErrorf("get rhy result failed: %d", resp.StatusCode)
return nil, fmt.Errorf("get rhy result failed: %d", resp.StatusCode)
}
rhyResultCacheTime = time.Now().Unix()
return cachedRhyResult, nil
}
func syncRhyBazaarHashFromResult(m map[string]any) {
rhyBazaarHashLock.Lock()
defer rhyBazaarHashLock.Unlock()
if nil == m {
rhyBazaarHash = ""
return
}
v, ok := m["bazaar"]
if !ok || nil == v {
rhyBazaarHash = ""
return
}
s, ok := v.(string)View on GitHub (pinned to 8641553a1f)
Solutions
- Check network connectivity to the rhy endpoint and retry later if the server is down
- Inspect proxy/firewall settings; ensure the kernel's HTTPS requests are not intercepted
- Clear any cached network state and restart the kernel, then retry the update/marketplace operation
- If behind a corporate proxy, configure HTTPS_PROXY for the kernel process
Example fix
// before: no status handling by caller
result, err := getRhyResult()
// after: tolerate failure and fall back to cached/default metadata
result, err := getRhyResult()
if err != nil {
logging.LogWarnf("falling back to cached rhy result: %s", err)
result = lastKnownGoodRhyResult
} Defensive patterns
Strategy: retry
Validate before calling
// before calling an API that hits rhy
if !navigator.onLine { skipRemoteCheck() } Try / catch
result, err := getRhyResult()
if err != nil {
logging.LogWarnf("rhy unavailable, using cached data: %s", err)
result = cachedRhyResult // degrade gracefully
} Prevention
- Design update/marketplace checks to be non-fatal and fall back to cached metadata
- Retry with backoff for transient 5xx responses
- Document proxy configuration for corporate users
When it happens
Trigger: Calling any kernel API that resolves version/bazaar info (update checks, marketplace listing) when the rhy endpoint returns a non-200 status: server outage (5xx), blocked or rate-limited request (403/429), or a proxy returning an error page.
Common situations: Corporate proxy or firewall intercepting the request to the rhy service; rhy backend temporarily down or under maintenance; regional network restrictions (e.g. accessing liuyun.io/ld246 endpoints from restricted networks); stale DNS pointing at a wrong server.
Understand the failure class
Background: "API error: {status}" and "HTTP 401/403/404/429/5xx" errors: non-2xx HTTP responses explained — this error's family across 27 libraries.
Related errors
- read body failed: %s
- version request returned HTTP " + response.status
- authentication probe returned HTTP " + response.status
- boot progress request returned HTTP " + response.status
- unexpected status code: %d
AI-assisted analysis of siyuan-note/siyuan@8641553a1f (2026-09-11).
Data as JSON: /api/errors/5c0faf4c13ffae5d.
Report an issue: GitHub.