From 8effee4d09efb6621a4dad6195b41301d8a73cea Mon Sep 17 00:00:00 2001 From: modeco80 Date: Mon, 30 Sep 2024 06:53:36 -0400 Subject: [PATCH] improve error handling slightly --- src/main.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 20d3204..9935fd6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -79,7 +79,7 @@ async fn main() -> anyhow::Result<()> { node = id_clone.as_str() ); - shotter::take_one_screenshot( + match shotter::take_one_screenshot( &node_clone.url, &node_clone.origin, &id_clone, @@ -87,7 +87,15 @@ async fn main() -> anyhow::Result<()> { config.webp_quality, ) .instrument(span) - .await?; + .await + { + Ok(_) => {} + + Err(error) => { + // FIXME: On WebSocket errors, should we just try again? + tracing::error!("Error taking screenshot: {error}"); + } + }; } Ok(())