Skip to content

Commit

Permalink
fix: error out instead of success response
Browse files Browse the repository at this point in the history
  • Loading branch information
Devdutt Shenoi committed Apr 16, 2024
1 parent 8507624 commit 45b745d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion uplink/src/collector/downloader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ pub enum Error {
BadSave,
#[error("Save file doesn't exist")]
NoSave,
#[error("Download timedout")]
Timeout,
}

/// This struct contains the necessary components to download and store file as notified by a download file
Expand Down Expand Up @@ -226,7 +228,7 @@ impl FileDownloader {
_ = remove_file(state.current.meta.download_path.as_ref().unwrap());
error!("Last download has timedout; file deleted");

return Ok(());
return Err(Error::Timeout);
},
}
}
Expand Down

0 comments on commit 45b745d

Please sign in to comment.