Skip to content

fix: stop silently swallowing errors in runCommand#130

Merged
0pilatos0 merged 2 commits intomainfrom
fix/silent-error-swallowing
Mar 13, 2026
Merged

fix: stop silently swallowing errors in runCommand#130
0pilatos0 merged 2 commits intomainfrom
fix/silent-error-swallowing

Conversation

@0pilatos0
Copy link
Owner

Summary

  • Moved container.resolve() inside the try/catch so container resolution failures (e.g., unregistered service tokens) are caught instead of crashing
  • Ensured process.exitCode is always set to 1 on any failure — previously, errors caught before BaseCommand.handleError() ran would leave exit code at 0
  • Added stderr logging for container resolution errors so users see what went wrong
  • BaseCommand.run() already handles command-level errors via handleError() (outputs error + sets exit code), so the catch block only needs to cover what falls outside that path

Closes #126

Test plan

  • bun test — 417 tests pass
  • bun run lint — passes
  • bun run format:check — passes
  • Manually verify: trigger a command error and confirm error message is shown
  • Manually verify: exit code is 1 after a failed command

🤖 Generated with Claude Code

0pilatos0 and others added 2 commits March 13, 2026 21:45
Move container.resolve() inside try/catch so resolution failures are
caught. Ensure process.exitCode is always set to 1 on any failure,
and log container resolution errors to stderr. BaseCommand.run()
already handles command errors via handleError(), so we only need to
catch what falls outside of that.

Closes #126

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@0pilatos0 0pilatos0 merged commit 2143fd2 into main Mar 13, 2026
2 checks passed
@github-actions github-actions bot mentioned this pull request Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: runCommand silently swallows all errors with no user feedback

1 participant