siyuan-note/siyuan · error
Conf.Language(94) (localized upload failure message with ser
Error message
Conf.Language(94) (localized upload failure message with server msg)
What it means
After an asset upload HTTP request to the cloud succeeds at the transport level, uploadAssets checks the parsed response body's Code field. A non-zero Code means the server rejected the upload for an application-level reason; the function wraps the server-provided Msg into a localized message via Conf.Language(94) and returns it as err.
Source
Thrown at kernel/model/assets.go:1493
SetSuccessResult(requestResult).
SetFile("file[]", absAsset).
SetCookies(&http.Cookie{Name: "symphony", Value: uploadToken}).
SetHeader("meta-type", metaType).
SetHeader("biz-type", bizType).
Post(util.GetCloudServer() + "/apis/siyuan/upload?ver=" + util.Ver)
if nil != reqErr {
logging.LogErrorf("upload assets failed: %s", reqErr)
return count, ErrFailedToConnectCloudServer
}
if 401 == resp.StatusCode {
err = errors.New(Conf.Language(31))
return
}
if 0 != requestResult.Code {
logging.LogErrorf("upload assets failed: %s", requestResult.Msg)
err = fmt.Errorf(Conf.Language(94), requestResult.Msg)
return
}
absAsset = filepath.ToSlash(absAsset)
relAsset := absAsset[strings.Index(absAsset, "assets/"):]
completedUploadAssets = append(completedUploadAssets, relAsset)
logging.LogInfof("uploaded asset [%s]", relAsset)
count++
}
if !ignorePushMsg {
util.PushClearMsg(msgId)
}
if 0 < len(completedUploadAssets) {
logging.LogInfof("uploaded [%d] assets", len(completedUploadAssets))
}
returnView on GitHub (pinned to 8641553a1f)
Solutions
- Read the server message embedded in the error and address it (most commonly: free up cloud storage quota in Settings - Account).
- Retry after confirming the SiYuan cloud service status; transient server errors resolve on retry.
- Reduce the number/size of assets uploaded in one batch and retry.
- Re-login to the cloud if the error persists, to rule out stale session state.
Defensive patterns
Strategy: try-catch
Try / catch
try {
const res = await fetchPost('/api/asset/uploadCloud', {files});
if (res.code !== 0) {
// server message embedded in error; surface it and offer quota check
showQuotaDialog(res.msg);
}
} catch (e) {
showToast(e.message); // contains the server-provided reason
} Prevention
- Monitor cloud storage quota before large asset uploads
- Upload assets in smaller batches to reduce server rejections
- Check SiYuan cloud service status during incidents
- Surface the embedded server message to users instead of a generic retry
When it happens
Trigger: Calling the asset upload path (uploadAssets) when the cloud server replies with a JSON body whose code != 0 — e.g. storage quota exceeded, file rejected by server-side rules, or server-side internal error. The server's Msg text is embedded in the returned error.
Common situations: Cloud storage quota full; uploading an asset type/size the server rejects; temporary cloud service incidents; account restrictions after subscription changes.
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
- Account authentication failed, please login again
- Upload failed: %s
- Conf.Language(31) (localized cloud auth failure message)
- bazaarRatingRateLimited
- Failed to insert asset file, please reopen the document
AI-assisted analysis of siyuan-note/siyuan@8641553a1f (2026-09-11).
Data as JSON: /api/errors/43b229f6627e6032.
Report an issue: GitHub.