Skip to content

Enhance user-facing error messages for remote server install failures#10531

Draft
alokedesai wants to merge 2 commits intomasterfrom
orchestrator/error-messages
Draft

Enhance user-facing error messages for remote server install failures#10531
alokedesai wants to merge 2 commits intomasterfrom
orchestrator/error-messages

Conversation

@alokedesai
Copy link
Copy Markdown
Member

Description

Enhance user-facing error messages in transport.rs for remote server install failures. Instead of showing the generic "Script exited with code N: " for all ScriptFailed errors, the user_facing_error() method now detects specific patterns in stderr and produces targeted, actionable messages:

Failure condition Old message New message
Permission denied / Read-only FS Script exited with code 1: mkdir: cannot create directory... Cannot create install directory — check write permissions on your home directory (exit code 1)
No space left on device Script exited with code 2: No space left on device Not enough disk space on the remote host — free up space and try again (exit code 2)
SSH disconnect (exit 255, empty stderr) Script exited with code 255: SSH connection was lost during installation — please reconnect and try again
Unsupported architecture Script exited with code 2: unsupported arch: armv7l This remote host uses a armv7l processor, which is not supported. Warp SSH extension requires x86_64 or aarch64 (arm64).
Other errors (unchanged) (unchanged — still uses truncated stderr format)

Linked Issue

N/A — part of remote server install failure improvements initiative.

  • The linked issue is labeled ready-to-spec or ready-to-implement.
  • Where appropriate, screenshots or a short video of the implementation are included below (especially for user-visible or UI changes).

Testing

Added 12 unit tests in transport_tests.rs covering all error patterns and edge cases:

  • Permission denied, read-only filesystem, disk full, SSH disconnect, unsupported arch
  • Default format fallback for unrecognised errors
  • Long stderr truncation
  • Whitespace-only stderr with exit code 255
  • Exit code 255 with real stderr content (should NOT trigger SSH disconnect)
  • Body text varies by setup stage

All tests pass. cargo fmt and cargo clippy pass clean.

  • I have manually tested my changes locally with ./script/run

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

Conversation: https://staging.warp.dev/conversation/cd4e30c2-95e7-4516-860d-427a6afbc70f
Run: https://oz.staging.warp.dev/runs/019e09f4-0711-7661-aa65-13b07ae4ddcb

This PR was generated with Oz.

Improve the ScriptFailed arm in Error::user_facing_error() to detect
specific patterns in stderr and produce targeted, actionable messages
instead of the generic 'Script exited with code N: <stderr>'.

New patterns detected:
- Permission denied / Read-only file system → write permissions advice
- No space left on device → disk space advice
- Exit code 255 + empty stderr → SSH disconnect message
- unsupported arch: <name> → architecture not supported message

Includes 12 unit tests covering all error patterns and edge cases.

Co-Authored-By: Oz <oz-agent@warp.dev>
@cla-bot cla-bot Bot added the cla-signed label May 8, 2026
Docker testing revealed that when the install directory runs out of
space, curl exits with code 23 and 'Failure writing output to
destination' rather than the OS-level 'No space left on device'. Add
this pattern to the disk-full check and a corresponding unit test.

Co-Authored-By: Oz <oz-agent@warp.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant