#[non_exhaustive]pub enum TenantError {
NamespaceNotFound(String),
NamespaceAlreadyExists(String),
QuotaExceeded {
namespace: String,
resource: String,
current: u64,
limit: u64,
},
InvalidConfig(String),
Schema(SchemaError),
}Expand description
Tenant / namespace errors.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
NamespaceNotFound(String)
Namespace not found.
NamespaceAlreadyExists(String)
Namespace already exists.
QuotaExceeded
A namespace quota has been exceeded.
§Information Disclosure
The error message deliberately includes current and limit
values. This is acceptable because:
The error is only returned to authenticated, namespace-scoped callers who already have write access and can trivially infer their own usage. Operators need these values for capacity-planning and debugging. The HTTP layer maps this to a 429 response with a generic message; the detailed fields are only visible in server logs and metrics (not forwarded to the end-user response body).
Fields
InvalidConfig(String)
Invalid namespace configuration.
Schema(SchemaError)
Schema validation error from chronix-core.
Trait Implementations§
Source§impl Debug for TenantError
impl Debug for TenantError
Source§impl Display for TenantError
impl Display for TenantError
Source§impl Error for TenantError
impl Error for TenantError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<SchemaError> for TenantError
impl From<SchemaError> for TenantError
Source§fn from(source: SchemaError) -> Self
fn from(source: SchemaError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for TenantError
impl RefUnwindSafe for TenantError
impl Send for TenantError
impl Sync for TenantError
impl Unpin for TenantError
impl UnsafeUnpin for TenantError
impl UnwindSafe for TenantError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more