Skip to content

Commit

Permalink
[Fix] Do not return the raw Web Scraper error to the client.
Browse files Browse the repository at this point in the history
  • Loading branch information
azasypkin committed Jul 22, 2023
1 parent 884bffd commit 3e462f8
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/utils/web_scraping/utils_web_scraping_action.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,16 @@ impl UtilsWebScrapingAction {
.send()
.await?
.json::<WebScraperResourcesResponse>()
.await?;
.await
.map_err(|err| {
log::error!(
"Cannot fetch resources for `{}` ({}): {:?}",
tracker.url,
tracker.name,
err
);
anyhow!("Tracker cannot fetch resources due to unexpected error")
})?;

api.web_scraping()
.save_web_page_resources(
Expand Down

0 comments on commit 3e462f8

Please sign in to comment.