sourmash
sourmash copied to clipboard
improve sourmash-rs core error reporting for bad/empty zip files
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 :)
is this the same or a related issue? https://github.com/sourmash-bio/sourmash/issues/3398