improve error handling slightly

This commit is contained in:
Lily Tsuru 2024-09-30 06:53:36 -04:00
parent c2918ffc87
commit 8effee4d09

View file

@ -79,7 +79,7 @@ async fn main() -> anyhow::Result<()> {
node = id_clone.as_str() node = id_clone.as_str()
); );
shotter::take_one_screenshot( match shotter::take_one_screenshot(
&node_clone.url, &node_clone.url,
&node_clone.origin, &node_clone.origin,
&id_clone, &id_clone,
@ -87,7 +87,15 @@ async fn main() -> anyhow::Result<()> {
config.webp_quality, config.webp_quality,
) )
.instrument(span) .instrument(span)
.await?; .await
{
Ok(_) => {}
Err(error) => {
// FIXME: On WebSocket errors, should we just try again?
tracing::error!("Error taking screenshot: {error}");
}
};
} }
Ok(()) Ok(())