diff --git a/src/api/core/organizations.rs b/src/api/core/organizations.rs index bc2b81d9..2c70bff0 100644 --- a/src/api/core/organizations.rs +++ b/src/api/core/organizations.rs @@ -1872,14 +1872,14 @@ async fn post_org_import( if headers.membership.atype < MembershipType::Admin && !Collection::can_access_collection(&headers.membership, &col_id, &mut conn).await { - err!(Small, "The current user isn't allowed to manage this collection") + err!(Compact, "The current user isn't allowed to manage this collection") } col_id } else { // We do not allow users or managers which can not manage all collections to create new collections // If there is any collection other than an existing import collection, abort the import. if headers.membership.atype <= MembershipType::Manager && !headers.membership.has_full_access() { - err!(Small, "The current user isn't allowed to create new collections") + err!(Compact, "The current user isn't allowed to create new collections") } let new_collection = Collection::new(org_id.clone(), col.name, col.external_id); new_collection.save(&mut conn).await?; diff --git a/src/error.rs b/src/error.rs index c215b8ff..a7a8ab07 100644 --- a/src/error.rs +++ b/src/error.rs @@ -59,7 +59,7 @@ use yubico::yubicoerror::YubicoError as YubiErr; #[derive(Serialize)] pub struct Empty {} -pub struct Small {} +pub struct Compact {} // Error struct // Contains a String error message, meant for the user and an enum variant, with an error of different types. @@ -71,7 +71,7 @@ make_error! { Empty(Empty): _no_source, _serialize, // Used to represent err! calls Simple(String): _no_source, _api_error, - Small(Small): _no_source, _api_error_small, + Compact(Compact): _no_source, _api_error_small, // Used in our custom http client to handle non-global IPs and blocked domains CustomHttpClient(CustomHttpClientError): _has_source, _api_error, @@ -233,7 +233,7 @@ use rocket::response::{self, Responder, Response}; impl Responder<'_, 'static> for Error { fn respond_to(self, _: &Request<'_>) -> response::Result<'static> { match self.error { - ErrorKind::Empty(_) | ErrorKind::Simple(_) | ErrorKind::Small(_) => {} // Don't print the error in this situation + ErrorKind::Empty(_) | ErrorKind::Simple(_) | ErrorKind::Compact(_) => {} // Don't print the error in this situation _ => error!(target: "error", "{self:#?}"), };