{"record":{"id":"b518170b82d94d1a","repo":"siyuan-note/siyuan","slug":"result-msg","errorCode":null,"errorMessage":"result.Msg","messagePattern":"result\\.Msg","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"kernel/model/export.go","lineNumber":484,"sourceCode":"\t\t\tresp, sendErr = request.Put(apiURL)\n\t\t} else {\n\t\t\tresp, sendErr = request.Post(apiURL)\n\t\t}\n\t\tif nil != sendErr {\n\t\t\tlogging.LogErrorf(\"send article to liandi failed: %s\", sendErr)\n\t\t\treturn sendErr\n\t\t}\n\t\tif 200 != resp.StatusCode {\n\t\t\tmsg := fmt.Sprintf(\"send article to liandi failed [sc=%d]\", resp.StatusCode)\n\t\t\tlogging.LogError(msg)\n\t\t\treturn errors.New(msg)\n\t\t}\n\n\t\tif 0 != result.Code {\n\t\t\tmsg := fmt.Sprintf(\"send article to liandi failed [code=%d, msg=%s]\", result.Code, result.Msg)\n\t\t\tlogging.LogError(msg)\n\t\t\tutil.PushClearMsg(msgId)\n\t\t\treturn errors.New(result.Msg)\n\t\t}\n\n\t\tif !foundArticle {\n\t\t\tarticleId = result.Data.(string)\n\t\t\ttree, _ = LoadTreeByBlockID(id) // 这里必须重新加载，因为前面导出时已经修改了树结构\n\t\t\ttree.Root.SetIALAttr(liandiArticleIdAttrName, articleId)\n\t\t\tif err = writeTreeUpsertQueue(tree); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\n\t\tutil.PushMsg(fmt.Sprintf(Conf.Language(181), util.GetCloudAccountServer()+\"/article/\"+articleId), 7000)\n\t\treturn nil\n\t})\n\treturn\n}\n\nfunc ExportSystemLog() (zipPath string) {","sourceCodeStart":466,"sourceCodeEnd":502,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/afa823b6b4e4f183511e0bc0a3be93caa94c7c97/kernel/model/export.go#L466-L502","documentation":"liandi answered HTTP 200 but with a non-zero business result code; the kernel returns result.Msg directly (the log line 'send article to liandi failed [code=..., msg=...]' carries both). The text is whatever the liandi API reported, e.g. invalid title, content rejected, or posting frequency limit.","triggerScenarios":"Article content or title violates liandi validation rules; posting too frequently; the account lacking permission to publish; a stale liandiArticleIdAttrName pointing at an article that no longer exists.","commonSituations":"Very long markdown docs; rapid re-shares after edits; special characters or over-long titles; previously deleted article on the forum while the doc still stores its ID.","solutions":["Act on the returned message text: shorten the title/content or wait out the frequency limit, then retry","If updates keep failing, remove the doc's liandi article id attribute to force a fresh POST instead of PUT","Check the article on ld246.com in a browser to see its actual state"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"if result.Code != 0 {\n    switch {\n    case strings.Contains(result.Msg, \"frequency\"), strings.Contains(result.Msg, \"频率\"):\n        // wait and retry later\n    default:\n        // surface result.Msg to the user for content fixes\n    }\n}","preventionTips":["Keep titles within forum limits before sharing","Avoid rapid consecutive re-shares; wait between updates","If updates keep failing, clear the doc's liandi article id attribute to force a fresh post"],"tags":["liandi","api-business-error","export","validation"],"backgroundTag":"upstream-api-business-error","analyzedSha":"afa823b6b4e4f183511e0bc0a3be93caa94c7c97","analyzedAt":"2026-08-18T17:04:10.865Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}