{"record":{"id":"473c0b401a15d800","repo":"siyuan-note/siyuan","slug":"conf-language-84-conf-language-154","errorCode":null,"errorMessage":"Conf.Language(84), Conf.Language(154)","messagePattern":"Conf\\.Language\\(84\\), Conf\\.Language\\(154\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"kernel/model/repository.go","lineNumber":1532,"sourceCode":"\tswitch Conf.Sync.Provider {\n\tcase conf.ProviderSiYuan:\n\t\tif !IsSubscriber() {\n\t\t\tutil.PushErrMsg(Conf.Language(29), 5000)\n\t\t\treturn\n\t\t}\n\tcase conf.ProviderWebDAV, conf.ProviderS3, conf.ProviderLocal:\n\t\tif !IsPaidUser() {\n\t\t\tutil.PushErrMsg(Conf.Language(214), 5000)\n\t\t\treturn\n\t\t}\n\t}\n\n\tutil.PushEndlessProgress(Conf.Language(116))\n\tdefer util.PushClearProgress()\n\tuploadFileCount, uploadChunkCount, uploadBytes, err := repo.UploadTagIndex(tag, id, map[string]any{eventbus.CtxPushMsg: eventbus.CtxPushMsgToStatusBarAndProgress})\n\tif err != nil {\n\t\tif errors.Is(err, dejavu.ErrCloudBackupCountExceeded) {\n\t\t\terr = fmt.Errorf(Conf.Language(84), Conf.Language(154))\n\t\t\treturn\n\t\t}\n\t\thandleCloudError(err)\n\t\terr = fmt.Errorf(Conf.Language(84), formatRepoErrorMsg(err))\n\t\treturn\n\t}\n\tmsg := fmt.Sprintf(Conf.Language(152), uploadFileCount, uploadChunkCount, humanize.BytesCustomCeil(uint64(uploadBytes), 2))\n\tutil.PushMsg(msg, 5000)\n\tutil.PushStatusBar(msg)\n\treturn\n}\n\nfunc RemoveCloudRepoTag(tag string) (err error) {\n\tassetDownloadSourceMu.RLock()\n\tdefer assetDownloadSourceMu.RUnlock()\n\tif 1 > len(Conf.Repo.Key) {\n\t\terr = errors.New(Conf.Language(26))\n\t\treturn","sourceCodeStart":1514,"sourceCodeEnd":1550,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/8641553a1f07374001902d3ce773285db1292b2d/kernel/model/repository.go#L1514-L1550","documentation":"After the underlying repo.UploadTagIndex fails with dejavu.ErrCloudBackupCountExceeded, UploadCloudSnapshot rewraps it as fmt.Errorf(Conf.Language(84), Conf.Language(154)): 'Backup failed: The cloud can only support backup up to 12 snapshots'. SiYuan's cloud service enforces a quota of at most 12 snapshots per backup; exceeding it makes the upload fail with this specific error before any other handling.","triggerScenarios":"Calling uploadCloudSnapshot when the cloud backup already holds 12 snapshots and no old snapshot is removed; repeated automated snapshot uploads against a free cloud account that has hit the retention limit.","commonSituations":"Long-running workspaces with many manual or tag-based cloud snapshots; scripts or plugins that upload cloud snapshots on a schedule without pruning; users who upgraded devices but not their cloud snapshot quota.","solutions":["Delete old cloud snapshots first (Settings - Account & Sync - Cloud backup / snapshot management, or /api/repo/removeCloudRepoTag) then retry the upload","Change the snapshot tag to one whose snapshot count is under the 12-snapshot quota","Upgrade the SiYuan membership if a higher cloud snapshot quota is available"],"exampleFix":"// before\nawait fetchPost('/api/repo/uploadCloudSnapshot', {tag: 'daily', id: id});\n// after: prune before uploading\nconst logs = (await fetchSyncPost('/api/repo/getCloudRepoTagSnapshots', {tag: 'daily'})).data.logs;\nif (logs.length >= 12) {\n  await fetchPost('/api/repo/removeCloudRepoTag', {tag: 'daily'}); // or remove individual snapshots\n}\nawait fetchPost('/api/repo/uploadCloudSnapshot', {tag: 'daily', id: id});","handlingStrategy":"validation","validationCode":"const logs = (await fetchSyncPost('/api/repo/getCloudRepoTagSnapshots', {tag})).data.logs;\nif (logs.length >= 12) {\n  throw new Error('Cloud snapshot quota (12) reached for tag ' + tag);\n}","typeGuard":"function isQuotaExceeded(err) {\n  return err instanceof Error && /12 snapshots/i.test(err.message);\n}","tryCatchPattern":"try {\n  await fetchPost('/api/repo/uploadCloudSnapshot', {tag, id});\n} catch (e) {\n  if (isQuotaExceeded(e)) { await pruneOldCloudSnapshots(tag); await retry(); }\n  else { throw e; }\n}","preventionTips":["Prune or rotate old cloud snapshots before automated uploads","Check snapshot counts per tag periodically in maintenance scripts","Use distinct tags so per-tag snapshot counts stay below the 12-snapshot quota"],"tags":["cloud-backup","quota","siyuan"],"backgroundTag":"file-size-limit-exceeded","analyzedSha":"8641553a1f07374001902d3ce773285db1292b2d","analyzedAt":"2026-09-11T16:08:28.414Z","contentChangedAt":"2026-09-11T16:08:28.414Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}