Skip to content

Commit

Permalink
chore: changed warn logs for error
Browse files Browse the repository at this point in the history
  • Loading branch information
paulobressan committed Jul 19, 2024
1 parent 46b4d3e commit f82b388
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/domain/project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use rand::{
};
use rdkafka::message::ToBytes;
use std::sync::Arc;
use tracing::{error, info, warn};
use tracing::{error, info};
use uuid::Uuid;

use super::{
Expand Down Expand Up @@ -120,12 +120,12 @@ pub async fn verify_secret(
key: &str,
) -> Result<ProjectSecretCache> {
let (hrp, key) = bech32::decode(key).map_err(|error| {
warn!(?error, "invalid bech32");
error!(?error, "invalid bech32");
Error::msg("invalid bech32")
})?;

if !hrp.to_string().eq("dmtr_apikey") {
warn!(?hrp, "invalid bech32 hrp");
error!(?hrp, "invalid bech32 hrp");
bail!("invalid project secret")
}

Expand Down

0 comments on commit f82b388

Please sign in to comment.