improve error handling slightly
This commit is contained in:
parent
c2918ffc87
commit
8effee4d09
1 changed files with 10 additions and 2 deletions
12
src/main.rs
12
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(())
|
||||
|
|
Loading…
Reference in a new issue