diff --git a/src/main.rs b/src/main.rs index 704cffb..9575ca9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -40,6 +40,10 @@ async fn index(path: web::Path) -> impl Responder { let lines: Vec = parsed.select(&line_selector).collect(); + if lines.is_empty() { + return HttpResponse::Ok().body("Something went wrong!"); + } + let mut collected = String::new(); for element in lines {