v0.1.1: language picker on welcome screen, friendly errors for unpublished package / unreachable server, backlog notes

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
ДмитрийandClaude Sonnet 5.5 committed 2026-09-30 12:27:21 +05:00
1 parent 68050882b8
commit f620f87432
15 files changed
+102 -22

No files matched your search

+4 -1
View File
@@ -28,7 +28,10 @@ pub fn fetch_small(source: &Source, name: &str) -> Result<Vec<u8>> {
let url = format!("{}/{name}", base.trim_end_matches('/'));
download::check_url(&url)?;
let t = download::HttpTransport::new()?;
let reply = download::Transport::get(&t, &url, 0).map_err(|e| Error::Invalid(format!("Could not reach the download server: {e}")))?;
let reply = download::Transport::get(&t, &url, 0).map_err(|e| Error::NetworkUnreachable(format!("{e}")))?;
if reply.status == 404 || reply.status == 410 {
return Err(Error::PackageNotPublished(format!("the download server answered {} for {name} ({url})", reply.status)));
}
if reply.status != 200 {
return Err(Error::Invalid(format!("The download server answered {} for {name}.", reply.status)));
}