rust-secure-code / cargo-supply-chain

Gather author, contributor and publisher data on crates in your dependency graph.
Apache License 2.0
315 stars 18 forks source link

Don't panic on network failure #11

Closed Shnatsel closed 3 years ago

Shnatsel commented 3 years ago

Currently cargo supply-chain panics if an API call fails because of this .unwrap():

https://github.com/rust-secure-code/cargo-supply-chain/blob/c960bff32e41827a5116922e9f9aa1d2c7abe2b6/src/publishers.rs#L94-L101

We should retry the request a few times instead of panicking.

dutt commented 3 years ago

Took a crack at this.

Shnatsel commented 3 years ago

Done in #27, requests are now retried with exponential backoff.