{"record":{"id":"57dce4ab61215169","repo":"a-b-street/abstreet","slug":"failed-to-download-stuff","errorCode":null,"errorMessage":"Failed to download stuff: {:?}","messagePattern":"Failed to download stuff: (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"updater/src/main.rs","lineNumber":153,"sourceCode":"if !failed.is_empty() {\n    // Fail the build.\n    panic!(\"Failed to download stuff: {:?}\", failed);\n}\n\nremove_empty_directories(\"data/input\");\nremove_empty_directories(\"data/system\");","sourceCodeStart":135,"sourceCodeEnd":171,"githubUrl":"https://github.com/a-b-street/abstreet/blob/0964f29315820c91b171b585eb51e300164e9197/updater/src/main.rs#L135-L171","documentation":"download_updates collects per-file download/decompress failures into a `failed` list and continues past each one; after the loop, if anything failed, it panics with the whole list to fail the updater build/run. This fires when one or more data files could not be fetched from S3 (or the local mirror) or could not be gzip-decoded — a network or manifest-version mismatch problem, not a per-call abort.","triggerScenarios":"One or more downloads during `updater download` fail (network error, 404 from the remote server, version not yet uploaded), leaving the `failed` list non-empty at the end of the loop.","commonSituations":"CI running against a dev/remote data URL while the server is down; renamed/deleted remote files; wrong version string; no network access in the build environment.","solutions":["Rerun the download once connectivity is restored — transient network failures are the usual cause","Check the remote data URL/version is correct and the files exist on the server","Inspect the failed list printed in the panic to see exactly which paths 404'd","Download from a local mirror (dl_from_local) if the remote is unavailable"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// pre-check reachability\nlet resp = reqwest::get(&format!(\"{}/{}\", base, path)).await?;\nif !resp.status().is_success() { eprintln!(\"missing: {}\", path); }","typeGuard":null,"tryCatchPattern":"match download_file(version, path, local).await {\n    Ok(bytes) => save(bytes),\n    Err(e) => { eprintln!(\"retrying {}: {:?}\", path, e); retry_with_backoff(); }\n}","preventionTips":["Retry transient network failures with backoff before failing the build","Verify the remote version/URL exists before batch download","Pin to a known-good data version in CI"],"tags":["rust","panic","network","download","ci"],"backgroundTag":"http-request-failed","analyzedSha":"0964f29315820c91b171b585eb51e300164e9197","analyzedAt":"2026-09-13T18:02:03.421Z","contentChangedAt":"2026-09-13T18:02:03.421Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}