mirror of
https://git.alemi.dev/fedicharter.git
synced 2024-11-22 16:34:49 +01:00
fix: say which error it was when failing on serving
This commit is contained in:
parent
84467f0141
commit
f859314548
1 changed files with 7 additions and 2 deletions
|
@ -33,6 +33,11 @@ async fn route_crawl_domain(
|
|||
) -> Json<(Vec<ChartVertex>, Vec<ChartArc>)> {
|
||||
tracing::info!("starting new crawl from {}", params.domain);
|
||||
let mut chart = BubbleChart::new(db.clone());
|
||||
chart.chart_local_bubble(¶ms.domain).await.expect("wtf could not chart this");
|
||||
Json((chart.vertices.values().into_iter().cloned().collect(), chart.arcs))
|
||||
match chart.chart_local_bubble(¶ms.domain).await {
|
||||
Ok(()) => Json((chart.vertices.values().into_iter().cloned().collect(), chart.arcs)),
|
||||
Err(e) => {
|
||||
tracing::error!("could not chart requested domain: {}", e);
|
||||
Json((Vec::new(), Vec::new()))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue