Skip to content

Commit

Permalink
logging: added offending method name if verify_rune fails
Browse files Browse the repository at this point in the history
  • Loading branch information
daywalker90 committed Oct 11, 2024
1 parent 3903df1 commit 76ee0a2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/shared.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub async fn verify_rune(
data: None,
message: "Not authorized: Missing rune".to_string(),
};
log::info!("{}", err);
log::info!("verify_rune failed: method:`{}` {}", rpc_method, err);
return Err(AppError::Forbidden(err));
}
};
Expand All @@ -35,7 +35,7 @@ pub async fn verify_rune(
{
Ok(o) => serde_json::from_value::<CheckruneResponse>(o).unwrap(),
Err(e) => {
log::info!("{}", e);
log::info!("verify_rune failed: method:`{}` {}", rpc_method, e);
return Err(AppError::Unauthorized(e));
}
};
Expand All @@ -46,7 +46,7 @@ pub async fn verify_rune(
message: "Rune is not valid".to_string(),
data: None,
};
log::info!("{}", err);
log::info!("verify_rune failed: method:`{}` {}", rpc_method, err);
return Err(AppError::Unauthorized(err));
}

Expand Down

0 comments on commit 76ee0a2

Please sign in to comment.