sourmash icon indicating copy to clipboard operation
sourmash copied to clipboard

improve sourmash-rs core error reporting for bad/empty zip files

Open ctb opened this issue 1 year ago • 1 comments
trafficstars

Extracting from issues reported in https://github.com/sourmash-bio/sourmash/issues/3191 and https://github.com/sourmash-bio/sourmash/issues/3190 -

we get this error on empty zip files:

sourmash.exceptions.Panic: sourmash panicked: thread 'unnamed' panicked with 'called `Result::unwrap()` on an `Err` value: InvalidArchive("Too small for anything but End Of Central Directory Record")' at src/core/src/storage.rs:367

and this error on bad/broken zip files:

sourmash.exceptions.Panic: sourmash panicked: thread 'unnamed' panicked with 'called `Result::unwrap()` on an `Err` value: InvalidArchive("Couldn't find End Of Central Directory Record")' at src/core/src/storage.rs:358 

This feels like an opportunity to improve the Rust error reporting :)

ctb avatar Jun 16 '24 15:06 ctb

is this the same or a related issue? https://github.com/sourmash-bio/sourmash/issues/3398

ctb avatar Jun 14 '25 14:06 ctb