From 4121fc4d5608221d876fa6157750de69e6218ee0 Mon Sep 17 00:00:00 2001 From: SorteKanin Date: Wed, 6 Sep 2023 19:29:15 +0200 Subject: [PATCH] Include domain in errors (#3944) --- crates/apub/src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/apub/src/lib.rs b/crates/apub/src/lib.rs index 7ebe68223..985210b36 100644 --- a/crates/apub/src/lib.rs +++ b/crates/apub/src/lib.rs @@ -49,13 +49,13 @@ impl UrlVerifier for VerifyUrlData { .. } => anyhow!("Federation disabled"), LemmyError { - error_type: LemmyErrorType::DomainBlocked(_), + error_type: LemmyErrorType::DomainBlocked(domain), .. - } => anyhow!("Domain is blocked"), + } => anyhow!("Domain {domain:?} is blocked"), LemmyError { - error_type: LemmyErrorType::DomainNotInAllowList(_), + error_type: LemmyErrorType::DomainNotInAllowList(domain), .. - } => anyhow!("Domain is not in allowlist"), + } => anyhow!("Domain {domain:?} is not in allowlist"), _ => anyhow!("Failed validating apub id"), })?; Ok(())