pub enum LicenseError {
ServerError(String),
InvalidLicense(String),
NetworkError(Error),
StorageError(Error),
EncryptionError(String),
DecryptionError(String),
KeyringError(String),
ConfigError(String),
ClientApiError(ClientApiError),
UnknownError,
}Expand description
Central error type for license-related operations.
This is used by both the client and the server side of Talos. HTTP mapping / printing / logging should be done outside this type.
Variants§
ServerError(String)
The server responded with an application-level error.
InvalidLicense(String)
The license is invalid for the requested operation.
NetworkError(Error)
Network / HTTP client errors when talking to the licensing server.
StorageError(Error)
Local storage errors (filesystem, OS I/O, etc.).
EncryptionError(String)
Errors during encryption (wrong key, algorithm failure, etc.).
DecryptionError(String)
Errors during decryption (corrupted ciphertext, wrong key, etc.).
KeyringError(String)
Errors when accessing the OS keyring/credential store.
ConfigError(String)
Configuration-related errors (missing values, invalid formats, etc.).
ClientApiError(ClientApiError)
Structured API error from the license server.
This wraps the server’s error response with machine-readable error codes for programmatic error handling.
UnknownError
Fallback for unexpected conditions that don’t fit other variants.
Trait Implementations§
Source§impl Debug for LicenseError
impl Debug for LicenseError
Source§impl Display for LicenseError
impl Display for LicenseError
Source§impl Error for LicenseError
impl Error for LicenseError
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
Source§impl From<Error> for LicenseError
impl From<Error> for LicenseError
Source§impl From<Error> for LicenseError
impl From<Error> for LicenseError
Source§impl From<LicenseError> for ApiError
impl From<LicenseError> for ApiError
Source§fn from(err: LicenseError) -> Self
fn from(err: LicenseError) -> Self
Source§impl IntoResponse for LicenseError
Map internal LicenseError into an HTTP response Axum understands.
impl IntoResponse for LicenseError
Map internal LicenseError into an HTTP response Axum understands.
This lets handlers return:
Result<Json
Uses the standardized ApiError format for consistent error responses.
Source§fn into_response(self) -> Response
fn into_response(self) -> Response
Auto Trait Implementations§
impl Freeze for LicenseError
impl !RefUnwindSafe for LicenseError
impl Send for LicenseError
impl Sync for LicenseError
impl Unpin for LicenseError
impl !UnwindSafe for LicenseError
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 moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.