Skip to content

[TOW-1331] Expose exit code on crash for local app run - #153

Merged
sammuti merged 3 commits into
developfrom
chore/expose-error-code
Jan 8, 2026
Merged

[TOW-1331] Expose exit code on crash for local app run#153
sammuti merged 3 commits into
developfrom
chore/expose-error-code

Conversation

@sammuti

Copy link
Copy Markdown
Contributor

Now prints something like

Oh no! Your local run crashed with exit code: 138

@github-actions

Copy link
Copy Markdown
Contributor

⚠️WARNING: This PR targets main instead of develop

This PR is targeting main which will trigger a production deployment when merged.

If this is a regular feature/fix PR, please change the base branch to develop.
If this is intentional (e.g., hotfix), you can ignore this warning.

Current base: main
Recommended base: develop

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR exposes the exit code when a local application run crashes, improving error reporting by displaying the specific exit code to users instead of a generic crash message.

Key Changes:

  • Modified crash error message to include the exit code
  • Added debug logging for status task completion
  • Cleaned up Status enum usage by removing redundant tower_runtime:: prefix

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Status::Crashed { .. } => {
output::error("Your local run crashed!");
Status::Crashed { code } => {
output::error(&format!("Your local run crashed with exit code: {}", code));

CopilotAIJan 7, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error message doesn't clarify what the exit code number means or provide guidance on next steps. Consider adding context like 'Oh no! Your local run crashed with exit code: {}' to match the description, or provide guidance on interpreting common exit codes.

Suggested change
output::error(&format!("Your local run crashed with exit code: {}", code));
let explanation = matchcode{
// 130: terminated by Ctrl+C / SIGINT in many environments
130 => " (the run was interrupted, often by Ctrl+C or SIGINT)",
// 137: often indicates the process was killed due to out-of-memory (SIGKILL)
137 => " (this often means the process was killed, for example due to out-of-memory)",
_ => " (check your app logs for details, or consult documentation for this exit code)",
};
output::error(&format!(
"Oh no! Your local run crashed with exit code: {}{}",
code, explanation
));

Copilot uses AI. Check for mistakes.
@sammuti
sammuti changed the base branch from main to developJanuary 7, 2026 10:47
@sammuti
sammuti merged commit cc5c9f8 into developJan 8, 2026
5 checks passed
@sammuti
sammuti deleted the chore/expose-error-code branch January 8, 2026 09:39
Sign up for freeto 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.

3 participants

@sammuti@konstantinoscs