fix(docker): show a clear message for a shell into a stopped container#75
Merged
Conversation
Derssa
approved these changes
Jul 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of Changes
Two small follow-up fixes on top of the container-ownership work already on
main:Stopped-container terminal message. Docker answers
409 "... is not running"when youexecinto a stopped container (terminal, DB explorers/queries).classifyDockerErrormatched this with its generic409branch and returnedNAME_CONFLICT("A container with this name already exists…"), which is nonsensical for a container that simply isn't running. A dedicated branch now maps this case to a newCONTAINER_NOT_RUNNINGcode with the message "This container is not running. Start it, then try again." This also corrects the same misclassification on the HTTP DB endpoints, which already routed throughclassifyDockerError.Neutral test-fixture names. The container-ownership integration test used fixture names carrying a branch-scoped prefix (
ownershipfixtures). They are renamed to plain, self-descriptive names so no build-scoped identifier ships in the public test suite.Types of Changes
Verification & Testing
Automated Checks
npm run lint— cleannpm run build— clean (tsc, exit 0)npm test— 298/298 unit tests pass (adds one classifier test for the stopped-container 409)npm run test:integration -- src/modules/containers/containerOwnership.itest.ts— 17/17 pass against a real Docker daemonManual Verification
Reproduced the original bug empirically:
execon a stopped container throwsstatusCode 409 "container … is not running"; running the compiledclassifyDockerErroron that error returnedNAME_CONFLICTbefore this change andCONTAINER_NOT_RUNNINGafter. The 17-test ownership integration suite (rogue container + cross-project) stays green with the renamed fixtures.Checklist