Include domain in errors (#3944)

This commit is contained in:
SorteKanin 2023-09-06 19:29:15 +02:00 committed by GitHub
parent 722027ce2e
commit 4121fc4d56
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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(())