{"record":{"id":"924a98e813736e5d","repo":"multica-ai/multica","slug":"download-update-failed-w","errorCode":null,"errorMessage":"download update failed: %w","messagePattern":"download update failed: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/internal/daemon/daemon.go","lineNumber":4423,"sourceCode":"// runUpdate executes the brew-or-download upgrade against targetVersion and\n// returns the human-readable output (always populated, even on failure when\n// brew gives us a useful diagnostic). The caller is responsible for the\n// `updating` CAS guard and for reporting status back to the server / triggering\n// the restart — extracted so the server-triggered path (handleUpdate) and the\n// auto-update poller (autoUpdateLoop) share the exact same execution body.\nfunc (d *Daemon) runUpdate(targetVersion string) (string, error) {\n\tif cli.IsBrewInstall() {\n\t\td.logger.Info(\"updating CLI via Homebrew...\")\n\t\tout, err := cli.UpdateViaBrew()\n\t\tif err != nil {\n\t\t\treturn out, fmt.Errorf(\"brew upgrade failed: %w\", err)\n\t\t}\n\t\treturn out, nil\n\t}\n\td.logger.Info(\"updating CLI via direct download...\", \"target_version\", targetVersion)\n\tout, err := cli.UpdateViaDownload(targetVersion)\n\tif err != nil {\n\t\treturn out, fmt.Errorf(\"download update failed: %w\", err)\n\t}\n\treturn out, nil\n}\n\n// updateReportBackoffs defines the retry schedule for delivering CLI update\n// status back to the server. This mirrors localSkillReportBackoffs because\n// both features have the same user-visible failure mode: the daemon completed\n// work locally, but a transient report failure leaves the UI waiting until the\n// server-side request times out.\n//\n// Overridable for tests to avoid real sleeps.\nvar updateReportBackoffs = []time.Duration{0, 500 * time.Millisecond, 2 * time.Second, 4 * time.Second}\n\nfunc (d *Daemon) reportUpdateResult(ctx context.Context, runtimeID, updateID string, payload map[string]any) {\n\td.reportUpdateResultWithRetry(ctx, runtimeID, updateID, func(ctx context.Context) error {\n\t\treturn d.client.ReportUpdateResult(ctx, runtimeID, updateID, payload)\n\t})\n}","sourceCodeStart":4405,"sourceCodeEnd":4441,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/internal/daemon/daemon.go#L4405-L4441","documentation":"Error \"download update failed: %w\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/internal/daemon/daemon.go:4423 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check network connectivity and retry the update download."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}