{"record":{"id":"7f2939b7aaedfc7a","repo":"siyuan-note/siyuan","slug":"conf-language-46","errorCode":null,"errorMessage":"Conf.Language(46)","messagePattern":"Conf\\.Language\\(46\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"kernel/model/bazaar.go","lineNumber":527,"sourceCode":"\nfunc GetBazaarPackageREADME(ctx context.Context, repoURL, repoHash, pkgType string) (ret string) {\n\tret = bazaar.GetBazaarPackageREADME(ctx, repoURL, repoHash, pkgType)\n\treturn\n}\n\n// installBazaarPackage 下载并安装集市包\nfunc installBazaarPackage(pkgType, repoURL, repoHash, repoRef, packageName string) (meta installMeta, err error) {\n\tinstallPath, jsonFileName, err := getPackageInstallPath(pkgType, packageName)\n\tif err != nil {\n\t\treturn\n\t}\n\n\tinstalledPkg, parseErr := bazaar.ParsePackageJSON(filepath.Join(installPath, jsonFileName))\n\tmeta.update = parseErr == nil && installedPkg != nil && installedPkg.Name == packageName\n\n\terr = bazaar.InstallPackage(repoURL, repoHash, repoRef, installPath, Conf.System.ID, pkgType, packageName, meta.update)\n\tif err != nil {\n\t\terr = fmt.Errorf(Conf.Language(46), packageName, err)\n\t}\n\treturn\n}\n\n// finishInstall 集市包安装后的处理（刷新外观、推送插件重载等）；批量更新时同类型只执行一次\n//\n//   - themeOptions：仅在新安装主题（meta.update 为 false）时写入外观；批量覆盖更新不会用到\n//   - applyNewAppearance：控制新安装图标是否自动应用；本地安装不自动应用\nfunc finishInstall(pkgType string, items []batchInstallItem, themeOptions *ThemeInstallOptions, applyNewAppearance bool) {\n\tif 1 > len(items) {\n\t\treturn\n\t}\n\n\tswitch pkgType {\n\tcase \"plugins\":\n\t\treloadPluginSet := hashset.New()\n\t\tfor _, item := range items {\n\t\t\tif !item.meta.update {","sourceCodeStart":509,"sourceCodeEnd":545,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/9f775e8a12daef8255556097396f9b2739078892/kernel/model/bazaar.go#L509-L545","documentation":"installBazaarPackage downloads and installs a marketplace package; when bazaar.InstallPackage fails (network error, repo clone failure, hash/ref not found, disk error), the underlying error is wrapped with localized message Conf.Language(46) plus the package name. The user-facing message hides the root cause, so inspect the wrapped %s portion.","triggerScenarios":"InstallBazaarPackage or batch updatePackages flows when the GitHub repo URL is unreachable, repoHash/repoRef does not exist in the repo, the workspace disk is full or read-only, or the install path cannot be written because the theme/icon is currently in use.","commonSituations":"Corporate proxy/firewall blocking github.com; installing a pinned hash that was force-pushed away; antivirus or file locks on Windows holding the target directory; interrupted network mid-clone.","solutions":["Read the wrapped underlying error after the localized prefix to find the root cause","Retry after confirming network access to the package's repo URL","Verify repoHash/repoRef still exists in the source repository","Free disk space / close processes locking the workspace install path, then retry the install"],"exampleFix":"// before: opaque install failure\nif err := model.InstallBazaarPackage(\"plugins\", repoURL, hash, ref, name, nil); err != nil { return err }\n// after: surface the underlying cause\nif err := model.InstallBazaarPackage(\"plugins\", repoURL, hash, ref, name, nil); err != nil {\n    logging.LogErrorf(\"install %s failed: %v\", name, err)\n    return err\n}","handlingStrategy":"try-catch","validationCode":"// preflight: repo reachable\nresp, err := http.Head(repoURL)\nif err != nil || resp.StatusCode >= 400 { return fmt.Errorf(\"repo unreachable: %s\", repoURL) }","typeGuard":null,"tryCatchPattern":"err := model.InstallBazaarPackage(pkgType, repoURL, hash, ref, name, nil)\nif err != nil {\n  // err is Conf.Language(46) wrapped; log full error for the underlying cause\n  logging.LogErrorf(\"install %s: %v\", name, err)\n  return retryWithBackoff(err)\n}","preventionTips":["Check network/proxy access to github.com before bulk installs","Validate repoHash/repoRef exist before installing pinned versions","Ensure adequate disk space and no file locks in the workspace"],"tags":["marketplace","install","network","i18n"],"backgroundTag":"http-request-failed","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"}