Remove useless error message prefix

This commit is contained in:
Greg Burri 2025-04-27 13:02:05 +02:00
parent cf9c6b2a3f
commit 2a1f246925

View file

@ -90,7 +90,7 @@ pub async fn sign_up_post(
) -> Result<Response> {
event!(
Level::WARN,
"[Sign up] Unable to sign up with email {}: {}",
"Unable to sign up with email {}: {}",
form_data.email,
error
);
@ -209,7 +209,7 @@ pub async fn sign_up_validation(
if let Some(ref user) = context.user {
event!(
Level::WARN,
"[Sign up] Unable to validate: user already logged. Email: {}",
"Unable to validate: user already logged. Email: {}",
user.email
);
return Ok((
@ -257,7 +257,7 @@ pub async fn sign_up_validation(
db::user::ValidationResult::ValidationExpired => {
event!(
Level::WARN,
"[Sign up] Unable to validate: validation expired. Token: {}",
"Unable to validate: validation expired. Token: {}",
token
);
Ok((
@ -275,7 +275,7 @@ pub async fn sign_up_validation(
db::user::ValidationResult::UnknownUser => {
event!(
Level::WARN,
"[Sign up] Unable to validate: unknown user. Token: {}",
"Unable to validate: unknown user. Token: {}",
token
);
Ok((
@ -293,10 +293,7 @@ pub async fn sign_up_validation(
}
}
None => {
event!(
Level::WARN,
"[Sign up] Unable to validate: no token provided"
);
event!(Level::WARN, "Unable to validate: no token provided");
Ok((
jar,
Html(
@ -355,7 +352,7 @@ pub async fn sign_in_post(
error @ db::user::SignInResult::AccountNotValidated => {
event!(
Level::WARN,
"[Sign in] Account not validated, email: {}: {}",
"Account not validated, email: {}: {}",
form_data.email,
error
);
@ -373,12 +370,7 @@ pub async fn sign_in_post(
))
}
error @ (db::user::SignInResult::UserNotFound | db::user::SignInResult::WrongPassword) => {
event!(
Level::WARN,
"[Sign in] Email: {}: {}",
form_data.email,
error
);
event!(Level::WARN, "Email: {}: {}", form_data.email, error);
Ok((
jar,
Html(
@ -653,7 +645,7 @@ pub async fn reset_password_post(
) -> Result<Response> {
event!(
Level::WARN,
"[Reset password] Email: {}: {}",
"Email: {}: {}",
if let Some(ref user) = context.user {
&user.email
} else {
@ -783,7 +775,7 @@ pub async fn edit_user_post(
) -> Result<Response> {
event!(
Level::WARN,
"[Edit user] Email: {}: {}",
"Email: {}: {}",
if let Some(ref user) = context.user {
&user.email
} else {
@ -980,12 +972,7 @@ pub async fn email_revalidation(
))
}
error @ db::user::ValidationResult::ValidationExpired => {
event!(
Level::WARN,
"[Email revalidation] Token: {}: {}",
token,
error
);
event!(Level::WARN, "Token: {}: {}", token, error);
Ok((
jar,
Html(
@ -999,12 +986,7 @@ pub async fn email_revalidation(
))
}
error @ db::user::ValidationResult::UnknownUser => {
event!(
Level::WARN,
"[Email revalidation] Email: {}: {}",
token,
error
);
event!(Level::WARN, "Email: {}: {}", token, error);
Ok((
jar,
Html(