From 67c072604680579b14a6132045569b8594466b3c Mon Sep 17 00:00:00 2001 From: chenbaowang <49091147+Rsweater@users.noreply.github.com> Date: Fri, 24 Apr 2026 10:58:55 +0800 Subject: [PATCH] fix(cli): enhance 503 error handling in download command --- skillhub-cli/src/commands/download.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/skillhub-cli/src/commands/download.ts b/skillhub-cli/src/commands/download.ts index 24862218..463f9a5d 100644 --- a/skillhub-cli/src/commands/download.ts +++ b/skillhub-cli/src/commands/download.ts @@ -169,6 +169,22 @@ export function registerDownload(program: Command) { if (statusCode >= 400) { spinner.fail(`Download failed: HTTP ${statusCode}`); + if (statusCode === 503) { + error("\n💡 Service Unavailable (503). This could mean:"); + error(" - The server is temporarily overloaded or under maintenance"); + error(" - The storage service is unavailable"); + error(" - Network connectivity issues"); + error("\nSuggestions:"); + error(" - Wait a moment and try again"); + error(" - Check your internet connection"); + error(" - Contact your administrator if the problem persists"); + } else if (statusCode === 404) { + error(`\n💡 Skill version not found: ${namespace}/${skillSlug}@${selectedVersion}`); + error(" - Try listing available versions: skillhub inspect " + slug); + } else if (statusCode === 403) { + error("\n💡 Access denied. You may not have permission to download this skill."); + error(" - Try: skillhub login"); + } process.exitCode = 1; return; }