Skip to content

Commit

Permalink
Don't display the timeout error if the API returned errors
Browse files Browse the repository at this point in the history
  • Loading branch information
sgrif committed May 14, 2019
1 parent 6af6789 commit 4d93f2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/crates-io/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ impl Registry {

match (self.handle.response_code()?, errors) {
(0, None) | (200, None) => {},
(503, _) if started.elapsed().as_secs() >= 29 && self.host_is_crates_io() => {
(503, None) if started.elapsed().as_secs() >= 29 && self.host_is_crates_io() => {
bail!("Request timed out after 30 seconds. If you're trying to \
upload a crate it may be too large. If the crate is under \
10MB in size, you can email help@crates.io for assistance.")
Expand Down

0 comments on commit 4d93f2d

Please sign in to comment.