{"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":468,"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, nil)\n\t\tresult := gulu.Ret.NewResult()\n\t\trequest := httpclient.NewCloudRequest30s()","sourceCodeStart":450,"sourceCodeEnd":486,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/9f775e8a12daef8255556097396f9b2739078892/kernel/model/export.go#L450-L486","documentation":"When exporting a document to Liandi, the kernel first queries the Liandi article API to see whether the article already exists. If the HTTP response status is neither 200 nor 404 (e.g. 401, 403, 500), it aborts with fmt.Errorf(\"get liandi article info failed [sc=%d]\", resp.StatusCode). Only 200 (article exists) and 404 (article not found) are considered valid answers.","triggerScenarios":"Calling Export2Liandi for an already-published article (liandi article id attribute present) while the Liandi server returns an unexpected status during the lookup GET — expired/invalid auth token, server error, rate limiting, or connectivity proxies returning 5xx/3xx.","commonSituations":"Expired Liandi session/token; Liandi server maintenance or 500 errors; corporate proxy intercepting the request; deleted-but-not-404 article states.","solutions":["Re-authenticate with Liandi (re-login so the kernel obtains a fresh token) and retry.","Check the reported status code: 401/403 means credentials, 5xx means server-side — retry later for 5xx.","Verify network/proxy access to the Liandi endpoint (util.GetCloudAccountServer()).","If the article attribute is stale, remove the liandiArticleIdAttrName IAL attribute so a fresh article is created."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"if err != nil && strings.Contains(err.Error(), \"get liandi article info failed\") {\n    // extract sc=N; retry with backoff for 5xx, re-auth for 401/403\n    return reauthAndRetry()\n}","preventionTips":["Keep Liandi credentials fresh; re-login before long publishing sessions","Monitor Liandi service status before bulk exports","Bypass or correctly configure proxies for the Liandi domain"],"tags":["network","liandi","http-status"],"backgroundTag":"http-error-response","analyzedSha":"9f775e8a12daef8255556097396f9b2739078892","analyzedAt":"2026-09-19T03:17:15.984Z","contentChangedAt":"2026-09-19T03:17:15.984Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}