Skip to content

Commit

Permalink
Merge pull request #24 from Overmuse/SR/log_serde_errors
Browse files Browse the repository at this point in the history
don't blow up on serde errors
  • Loading branch information
SebRollen authored Apr 21, 2021
2 parents c19b5ed + 7257d12 commit b7afca3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "polygon-data-relay"
version = "1.2.0"
version = "1.2.1"
authors = ["Sebastian Rollen <[email protected]>"]
edition = "2018"

Expand Down
13 changes: 8 additions & 5 deletions src/relay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,14 @@ pub async fn run(
}
}
}
Err(e) => {
let e = e.into();
sentry_anyhow::capture_anyhow(&e);
panic!("Failed to receive message from the WebSocket: {}", e)
}
Err(e) => match e {
polygon::errors::Error::Serde { .. } => {
let e = e.into();
sentry_anyhow::capture_anyhow(&e);
error!("Failed to reveive message from the WebSocket: {}", e)
}
_ => panic!("Failed to receive message from the WebSocket: {}", e),
},
}
},
)
Expand Down

0 comments on commit b7afca3

Please sign in to comment.