{"record":{"id":"4ec03dafaedbb985","repo":"bcicen/ctop","slug":"cannot-remove-container-v","errorCode":null,"errorMessage":"cannot remove container: %v","messagePattern":"cannot remove container: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"connector/manager/docker.go","lineNumber":126,"sourceCode":"func (dc *Docker) Remove() error {\n\tif err := dc.client.RemoveContainer(api.RemoveContainerOptions{ID: dc.id}); err != nil {\n\t\treturn fmt.Errorf(\"cannot remove container: %v\", err)\n\t}\n\treturn nil\n}","sourceCodeStart":108,"sourceCodeEnd":144,"githubUrl":"https://github.com/bcicen/ctop/blob/59f00dd6aaebf48f3bc501e174f75f815c2619f0/connector/manager/docker.go#L108-L144","documentation":"Wraps the error from the Docker Remote API's RemoveContainer call in Docker.Remove. It fires when the daemon refuses to delete the container — it is still running (no Force option is set) or the container no longer exists.","triggerScenarios":"Thrown at connector/manager/docker.go:126 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Stop the container before removal, or set Force in api.RemoveContainerOptions","Treat 'no such container' errors as successful removal","Verify the container ID exists before calling RemoveContainer","Check daemon connectivity and volume/remove options if removal keeps failing"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"59f00dd6aaebf48f3bc501e174f75f815c2619f0","analyzedAt":"2026-09-02T23:34:03.832Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-10T02:17:09.455Z"}