Skip to content

Commit

Permalink
Merge pull request #62 from epi052/61-change-url-error-to-warning
Browse files Browse the repository at this point in the history
timeouts logged as warnings, other errors remain the same
  • Loading branch information
epi052 committed Oct 7, 2020
2 parents 1f66d17 + 4279ac3 commit 4b4af5a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,12 @@ pub async fn make_request(client: &Client, url: &Url) -> FeroxResult<Response> {
}
Err(e) => {
log::trace!("exit: make_request -> {}", e);
log::error!("Error while making request: {}", e);
if e.to_string().contains("operation timed out") {
// only warn for timeouts, while actual errors are still left as errors
log::warn!("Error while making request: {}", e);
} else {
log::error!("Error while making request: {}", e);
}
Err(Box::new(e))
}
}
Expand Down

0 comments on commit 4b4af5a

Please sign in to comment.