#[non_exhaustive]pub enum TenantError {
NamespaceNotFound(String),
NamespaceAlreadyExists(String),
QuotaExceeded {
namespace: String,
resource: String,
current: u64,
limit: u64,
},
InvalidConfig(String),
Schema(SchemaError),
Persist(String),
}Expand description
Tenant / namespace errors.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
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.
Persist(String)
The registry could not be persisted.
Its own variant because it is the server’s fault and every other
variant here is the caller’s. They shared InvalidConfig, so a full
disk reached an operator as 400 invalid namespace config — a
message that sends them to re-read the request body while the
problem is the volume.
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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
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
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
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> ⓘ
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> ⓘ
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