mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-05-10 04:09:40 +00:00
fix: improve error messages with actionable guidance for common failures (#452)
- Add signal exit code handling (130/Ctrl+C, 137/killed, 255/SSH failure, 2/syntax error) - Replace vague "Cloud API retry logic exhausted" with attempt count and retry advice - Add network troubleshooting hint to API network error after retries - Clarify OAuth fallback prompt: explain why OAuth failed and what happens next - Consolidate auth cancellation message with three clear recovery options Agent: ux-engineer Co-authored-by: A <6723574+louisgv@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
f2c9af0d79
commit
55fd4022e8
2 changed files with 29 additions and 12 deletions
|
|
@ -424,6 +424,17 @@ function reportDownloadError(ghUrl: string, err: unknown): never {
|
|||
|
||||
export function getScriptFailureGuidance(exitCode: number | null, cloud: string): string[] {
|
||||
switch (exitCode) {
|
||||
case 130:
|
||||
return ["Script was interrupted (Ctrl+C). No server was left running."];
|
||||
case 137:
|
||||
return ["Script was killed (likely by the system due to timeout or out of memory)."];
|
||||
case 255:
|
||||
return [
|
||||
"SSH connection failed. Common causes:",
|
||||
" - Server is still booting (wait a moment and retry)",
|
||||
" - Firewall blocking SSH port 22",
|
||||
" - Server was terminated before the session started",
|
||||
];
|
||||
case 127:
|
||||
return [
|
||||
"A required command was not found. Check that these are installed:",
|
||||
|
|
@ -432,6 +443,11 @@ export function getScriptFailureGuidance(exitCode: number | null, cloud: string)
|
|||
];
|
||||
case 126:
|
||||
return ["A command was found but could not be executed (permission denied)."];
|
||||
case 2:
|
||||
return [
|
||||
"Shell syntax or argument error. This is likely a bug in the script.",
|
||||
` Report it at: ${pc.cyan(`https://github.com/OpenRouterTeam/spawn/issues`)}`,
|
||||
];
|
||||
case 1:
|
||||
return [
|
||||
"Common causes:",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue