We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 98e4d48 commit e69e8d7Copy full SHA for e69e8d7
src/web/crate_details.rs
@@ -241,12 +241,20 @@ impl CrateDetails {
241
242
#[fn_error_context::context("fetching readme for {} {}", self.name, self.version)]
243
fn fetch_readme(&self, storage: &Storage) -> anyhow::Result<Option<String>> {
244
- let manifest = storage.fetch_source_file(
+ let manifest = match storage.fetch_source_file(
245
&self.name,
246
&self.version,
247
"Cargo.toml",
248
self.archive_storage,
249
- )?;
+ ) {
250
+ Ok(manifest) => manifest,
251
+ Err(err) if err.is::<PathNotFoundError>() => {
252
+ return Ok(None);
253
+ }
254
+ Err(err) => {
255
+ return Err(err);
256
257
+ };
258
let manifest = String::from_utf8(manifest.content)
259
.context("parsing Cargo.toml")?
260
.parse::<toml::Value>()
0 commit comments