{"record":{"id":"d68d587352d4d5c3","repo":"abiosoft/colima","slug":"error-at-s-w","errorCode":null,"errorMessage":"error at '%s': %w","messagePattern":"error at '(.+?)': %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"cli/chain.go","lineNumber":134,"sourceCode":"\t\t\tif f.s != \"\" {\n\t\t\t\ta.log.Println(f.s, \"...\")\n\t\t\t\ta.lastStage = f.s\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\n\t\t// success\n\t\terr := f.f()\n\t\tif err == nil {\n\t\t\tcontinue\n\t\t}\n\n\t\t// warning\n\t\tif _, ok := err.(errNonFatal); ok {\n\t\t\tif a.lastStage == \"\" {\n\t\t\t\ta.log.Warnln(err)\n\t\t\t} else {\n\t\t\t\ta.log.Warnln(fmt.Errorf(\"error at '%s': %w\", a.lastStage, err))\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\n\t\t// error\n\t\tif a.lastStage == \"\" {\n\t\t\treturn err\n\t\t}\n\t\treturn fmt.Errorf(\"error at '%s': %w\", a.lastStage, err)\n\t}\n\treturn nil\n}\n\n// Retry retries `f` up to `count` times at interval.\n// If after `count` attempts there is an error, the command chain is terminated with the final error.\n// retryCount starts from 1.\nfunc (a *ActiveCommandChain) Retry(stage string, interval time.Duration, count int, f func(retryCount int) error) {\n\ta.Add(func() (err error) {","sourceCodeStart":116,"sourceCodeEnd":152,"githubUrl":"https://github.com/abiosoft/colima/blob/c3a5f9184d83a197184f897a9f07eb3c01b3bc88/cli/chain.go#L116-L152","documentation":"Emitted by ActiveCommandChain.Exec (cli/chain.go:134) for non-fatal errors: when a chain step returns an error wrapped in errNonFatal (created via cli.ErrNonFatal) and a stage label was previously set with Stage()/Stagef(), the error is logged as a warning 'error at \\'<lastStage>\\': <cause>' and the chain continues. It is diagnostics output, not a failure.","triggerScenarios":"Any command-chain function whose error is wrapped with cli.ErrNonFatal fails after at least one Stage() marker — typically optional provisioning/configuration steps during `colima start`/`colima stop` that colima deliberately treats as best-effort.","commonSituations":"Warnings during start such as optional network tweaks, rootless/rootful adjustments, or non-critical dependency steps failing; users see the warning line in `colima start` output but the command completes.","solutions":["Read the cause after the colon — the chain continued, so it is safe to ignore unless the warned feature misbehaves","Re-run with `colima start -v` (or -vv) for debug context around the named stage","If the warned feature matters, run the equivalent explicit subcommand (e.g. `colima start -p <profile> --<flag>`) to surface the problem as a hard error"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":"// Best-effort guard: the non-fatal marker type is unexported in cli,\n// so detect the wrapper's behaviour — chain continues and warns.\nfunc isChainWarning(logLine string) bool {\n    return strings.HasPrefix(logLine, \"error at '\") && !strings.HasSuffix(logLine, \"chain terminated\")\n}","tryCatchPattern":"err := chain.Exec() // warnings were already logged, Exec returned nil\n// Non-fatal steps never reach here as errors; when embedding colima,\n// wrap your own optional steps with cli.ErrNonFatal so they degrade to warnings:\nchain.Add(func() error {\n    if err := optionalStep(); err != nil {\n        return cli.ErrNonFatal(err) // logged as \"error at '<stage>': ...\", chain continues\n    }\n    return nil\n})","preventionTips":["Wrap only truly optional steps with cli.ErrNonFatal — anything required must return a bare error","Run colima with -v when investigating warnings so stage context is visible","Do not script failures on warning lines; check exit codes instead"],"tags":["command-chain","warning","logging","colima","go"],"backgroundTag":null,"analyzedSha":"c3a5f9184d83a197184f897a9f07eb3c01b3bc88","analyzedAt":"2026-08-15T18:58:08.334Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}