{"record":{"id":"f46b57df057191ab","repo":"siyuan-note/siyuan","slug":"get-liandi-article-info-failed-sc-d","errorCode":null,"errorMessage":"get liandi article info failed [sc=%d]","messagePattern":"get liandi article info failed \\[sc=(.+?)\\]","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"kernel/model/export.go","lineNumber":437,"sourceCode":"\t\t\t\tSetSuccessResult(result).\n\t\t\t\tSetCookies(&http.Cookie{Name: \"symphony\", Value: Conf.GetUser().UserToken}).\n\t\t\t\tGet(util.GetCloudAccountServer() + \"/api/v2/article/update/\" + articleId)\n\t\t\tif nil != getErr {\n\t\t\t\tlogging.LogErrorf(\"get liandi article info failed: %s\", getErr)\n\t\t\t\treturn getErr\n\t\t\t}\n\n\t\t\tswitch resp.StatusCode {\n\t\t\tcase 200:\n\t\t\t\tif 0 == result.Code {\n\t\t\t\t\tfoundArticle = true\n\t\t\t\t} else if 1 == result.Code {\n\t\t\t\t\tfoundArticle = false\n\t\t\t\t}\n\t\t\tcase 404:\n\t\t\t\tfoundArticle = false\n\t\t\tdefault:\n\t\t\t\treturn fmt.Errorf(\"get liandi article info failed [sc=%d]\", resp.StatusCode)\n\t\t\t}\n\t\t}\n\n\t\tapiURL := util.GetCloudAccountServer() + \"/api/v2/article\"\n\t\tif foundArticle {\n\t\t\tapiURL += \"/\" + articleId\n\t\t}\n\n\t\ttitle := path.Base(tree.HPath)\n\t\ttags := tree.Root.IALAttr(\"tags\")\n\t\tcontent := exportMarkdownContent0(id, tree, util.GetCloudForumAssetsServer()+time.Now().Format(\"2006/01\")+\"/siyuan/\"+Conf.GetUser().UserId+\"/\",\n\t\t\ttrue, false, false,\n\t\t\t\".md\", 3, 1, 1,\n\t\t\t\"#\", \"#\",\n\t\t\t\"\", \"\",\n\t\t\tfalse, false, nil, true, false)\n\t\tresult := gulu.Ret.NewResult()\n\t\trequest := httpclient.NewCloudRequest30s()","sourceCodeStart":419,"sourceCodeEnd":455,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/251596fc0de2f9528c00c224252fd073a99973f4/kernel/model/export.go#L419-L455","documentation":"Returned by Export2Liandi when checking whether a previously published article exists — the liandi API returned an HTTP status other than 200 or 404. The %d is the unexpected status code. This is a network/server-side issue: the community server is unavailable, rate-limiting, or returned an error.","triggerScenarios":"Export2Liandi sends a GET to /api/v2/article/update/<articleId> to check if the doc was already published. A status other than 200 (found) or 404 (not found) — e.g., 401 (auth expired), 429 (rate limit), 500/502/503 (server error) — triggers this error.","commonSituations":"User's login token (symphony cookie) expired or is invalid (401/403). Liandi community server is down for maintenance (5xx). Rate limiting after repeated share attempts (429). Network proxy or firewall returns an unexpected status.","solutions":["Re-authenticate to the community (re-login via Settings > Account) to refresh the user token, then retry.","If the server is returning 5xx, wait and retry after a few minutes — the community server may be temporarily unavailable.","Check network connectivity and proxy settings; ensure the kernel can reach util.GetCloudAccountServer()."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"if err := model.Export2Liandi(id); err != nil {\n    if strings.Contains(err.Error(), \"get liandi article info failed\") {\n        // network/server issue — refresh token and retry after delay\n        time.Sleep(5 * time.Second)\n        return model.Export2Liandi(id)\n    }\n    return err\n}","preventionTips":["Keep the community account token fresh (re-login if expired).","Avoid hammering the share API in a tight loop (rate limiting).","Verify network connectivity to the cloud account server before sharing."],"tags":["export","liandi","network","community","api-error"],"backgroundTag":null,"analyzedSha":"251596fc0de2f9528c00c224252fd073a99973f4","analyzedAt":"2026-08-12T21:18:37.123Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}