X-Git-Url: http://these/git/?a=blobdiff_plain;f=crates%2Futils%2Fsrc%2Ferror.rs;h=0dd9ba6cb421b4e91a22632ebf4479d110fbecb4;hb=ee7b35a04af4a200e25893249d8a32d4ceeea2b0;hp=78590a6a74d71e00bc9fe6892c5a6d2f46d50b69;hpb=ef9dc5d0b6f727cc78ab4df214e6e65ec77c3b9e;p=lemmy.git diff --git a/crates/utils/src/error.rs b/crates/utils/src/error.rs index 78590a6a..0dd9ba6c 100644 --- a/crates/utils/src/error.rs +++ b/crates/utils/src/error.rs @@ -142,7 +142,7 @@ pub enum LemmyErrorType { InvalidQuery, ObjectNotLocal, PostIsLocked, - PersonIsBannedFromSite, + PersonIsBannedFromSite(String), InvalidVoteValue, PageDoesNotSpecifyCreator, PageDoesNotSpecifyGroup, @@ -195,8 +195,8 @@ pub enum LemmyErrorType { CouldntFindObject, RegistrationDenied(String), FederationDisabled, - DomainBlocked, - DomainNotInAllowList, + DomainBlocked(String), + DomainNotInAllowList(String), FederationDisabledByStrictAllowList, SiteNameRequired, SiteNameLengthOverflow, @@ -207,6 +207,7 @@ pub enum LemmyErrorType { CouldntCreateAudioCaptcha, InvalidUrlScheme, CouldntSendWebmention, + ContradictingFilters, Unknown(String), } @@ -249,6 +250,8 @@ impl LemmyErrorExt2 for Result { #[cfg(test)] mod tests { + #![allow(clippy::unwrap_used)] + #![allow(clippy::indexing_slicing)] use super::*; use actix_web::{body::MessageBody, ResponseError}; use std::fs::read_to_string;