siyuan-note/siyuan · error

get liandi article info failed [sc=%d]

Error message

get liandi article info failed [sc=%d]

What it means

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.

Source

Thrown at kernel/model/export.go:437

				SetSuccessResult(result).
				SetCookies(&http.Cookie{Name: "symphony", Value: Conf.GetUser().UserToken}).
				Get(util.GetCloudAccountServer() + "/api/v2/article/update/" + articleId)
			if nil != getErr {
				logging.LogErrorf("get liandi article info failed: %s", getErr)
				return getErr
			}

			switch resp.StatusCode {
			case 200:
				if 0 == result.Code {
					foundArticle = true
				} else if 1 == result.Code {
					foundArticle = false
				}
			case 404:
				foundArticle = false
			default:
				return fmt.Errorf("get liandi article info failed [sc=%d]", resp.StatusCode)
			}
		}

		apiURL := util.GetCloudAccountServer() + "/api/v2/article"
		if foundArticle {
			apiURL += "/" + articleId
		}

		title := path.Base(tree.HPath)
		tags := tree.Root.IALAttr("tags")
		content := exportMarkdownContent0(id, tree, util.GetCloudForumAssetsServer()+time.Now().Format("2006/01")+"/siyuan/"+Conf.GetUser().UserId+"/",
			true, false, false,
			".md", 3, 1, 1,
			"#", "#",
			"", "",
			false, false, nil, true, false)
		result := gulu.Ret.NewResult()
		request := httpclient.NewCloudRequest30s()

View on GitHub (pinned to 251596fc0d)

Solutions

  1. Re-authenticate to the community (re-login via Settings > Account) to refresh the user token, then retry.
  2. If the server is returning 5xx, wait and retry after a few minutes — the community server may be temporarily unavailable.
  3. Check network connectivity and proxy settings; ensure the kernel can reach util.GetCloudAccountServer().
Defensive patterns

Strategy: retry

Try / catch

if err := model.Export2Liandi(id); err != nil {
    if strings.Contains(err.Error(), "get liandi article info failed") {
        // network/server issue — refresh token and retry after delay
        time.Sleep(5 * time.Second)
        return model.Export2Liandi(id)
    }
    return err
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of siyuan-note/siyuan@251596fc0d (2026-08-12). Data as JSON: /api/errors/f46b57df057191ab. Report an issue: GitHub.