{"record":{"id":"d8327aaa5b64f110","repo":"bcicen/ctop","slug":"action-not-implemented","errorCode":null,"errorMessage":"action not implemented","messagePattern":"action not implemented","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"connector/manager/main.go","lineNumber":5,"sourceCode":"package manager\n\nimport \"errors\"\n\nvar ActionNotImplErr = errors.New(\"action not implemented\")\n\ntype Manager interface {\n\tStart() error\n\tStop() error\n\tRemove() error\n\tPause() error\n\tUnpause() error\n\tRestart() error\n\tExec(cmd []string) error\n}\n","sourceCodeStart":1,"sourceCodeEnd":16,"githubUrl":"https://github.com/bcicen/ctop/blob/59f00dd6aaebf48f3bc501e174f75f815c2619f0/connector/manager/main.go#L1-L16","documentation":"ActionNotImplErr is a sentinel error exported by the manager package indicating that a lifecycle action (Start/Stop/Remove/Pause/Unpause/Restart) is not implemented by the Manager implementation. The Mock manager returns it for every action, and real implementations return it for unsupported operations on the current platform.","triggerScenarios":"Calling any Manager lifecycle method on a Mock instance, or on a backend (e.g. a platform-specific manager) that does not implement that particular action.","commonSituations":"Using the Mock driver in tests or by misconfiguration; calling Pause/Unpause on managers/backends that only support start/stop; switching connector backends via config to one with partial support.","solutions":["Configure a real manager implementation instead of the Mock driver","Check platform/backend support for the specific action before calling it","Handle the sentinel with errors.Is(err, manager.ActionNotImplErr) and skip or degrade gracefully"],"exampleFix":"// before\nmgr, _ := manager.ByName(\"mock\")\nmgr.Start() // action not implemented\n// after\nmgr, _ := manager.ByName(\"docker\")\nif err := mgr.Start(); errors.Is(err, manager.ActionNotImplErr) { /* unsupported: handle */ }","handlingStrategy":"type-guard","validationCode":"if _, ok := mgr.(*manager.Mock); ok { // skip actions or use a real manager }","typeGuard":"func implemented(m manager.Manager) bool { _, ok := m.(interface{ Start() error }); return !errors.Is(m.Start(), manager.ActionNotImplErr) }","tryCatchPattern":"if err := mgr.Start(); err != nil {\n    if errors.Is(err, manager.ActionNotImplErr) { /* degrade/skip */ }\n}","preventionTips":["Don't wire the Mock manager in production config","Feature-check actions per backend before calling","Use errors.Is against the exported sentinel"],"tags":["unimplemented","mock","interface"],"backgroundTag":"not-implemented","analyzedSha":"59f00dd6aaebf48f3bc501e174f75f815c2619f0","analyzedAt":"2026-09-02T23:34:03.832Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-10T02:17:09.455Z"}