diff --git a/src/serve/router.rs b/src/serve/router.rs index 48fc966..8190837 100644 --- a/src/serve/router.rs +++ b/src/serve/router.rs @@ -33,6 +33,11 @@ async fn route_crawl_domain( ) -> Json<(Vec, Vec)> { 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())) + } + } }