Skip to content

Commit

Permalink
fix: do not panic
Browse files Browse the repository at this point in the history
  • Loading branch information
lgalabru committed Apr 13, 2023
1 parent 67cb340 commit a0fa1a9
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions components/chainhook-cli/src/service/mod.rs
Expand Up @@ -363,9 +363,17 @@ fn load_predicates_from_redis(
let mut predicates = vec![];
for key in chainhooks_to_load.iter() {
let chainhook = match redis_con.hget::<_, _, String>(key, "specification") {
Ok(spec) => {
ChainhookSpecification::deserialize_specification(&spec, key).unwrap()
// todo
Ok(spec) => match ChainhookSpecification::deserialize_specification(&spec, key) {
Ok(spec) => spec,
Err(e) => {
error!(
ctx.expect_logger(),
"unable to load chainhook associated with key {}: {}",
key,
e.to_string()
);
continue;
}
}
Err(e) => {
error!(
Expand Down

0 comments on commit a0fa1a9

Please sign in to comment.