Repository navigation
Preserve not-found exit code for missing print items - #288
Merged
Mike Krüger (mkrueger) merged 2 commits intoNov 5, 2026
Merged
Conversation
Retain HTTP 404 in the friendly print error's exception chain so missing items map to exit code 5. Add regression coverage for status, message, and request charge. Fixes #279 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Mike Krüger (mkrueger)
requested review from
a team
and
a balanced review from Copilot
November 4, 2026 15:28
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the change preserving HTTP 404 classification for missing print items.
No open issues 🎉
What changed in this PR
Fixes #279 by preserving HTTP 404 in the exception chain for missing print items, allowing the existing exit-code classifier to return 5 instead of 1.
Changes:
- Retains the friendly missing-item diagnostic while preserving the HTTP status.
- Adds an offline regression test covering the diagnostic, status, exit code, and request-charge accounting.
- Documents the corrected behavior in the changelog.
| File | Description |
|---|---|
CosmosDBShell/Azure.Data.Cosmos.Shell.Commands/PrintCommand.cs |
Adds a status-bearing inner exception for missing items. |
CosmosDBShell.Tests/CommandTests/PrintCommandTests.cs |
Tests missing-item classification and preserved accounting. |
CHANGELOG.md |
Records the corrected not-found exit code. |
Review effort: Balanced
Code coverage overviewLanguages: C# C# / code-coverage/dotnet
View coverage of the 6 most impacted files.
ℹ️ Calculations represent line coverage. Results may change as calculations are updated. Updated |
Vsevolod Kukol (sevoku)
approved these changes
Nov 4, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Vsevolod Kukol (sevoku)
approved these changes
Nov 5, 2026
Mike Krüger (mkrueger)
deleted the
dev/mkrueger/fix/279-print-not-found-exit-code
branch
November 5, 2026 10:08
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.
Fixes #279.
Summary
printreceives a missing-item stream response, so the existing exit-code classifier returns5instead of1.Validation
dirJSON contract test.