rustfs/rustfs · error · KmsError::CacheError

Cache error: {message}

Error message

Cache error: {message}

What it means

The KMS key cache reported an error — an operation on the in-memory cache of keys/DEKs failed, e.g. an entry is in an invalid state or a cache update was rejected. Distinct from backend errors; the failure is local to the cache layer.

Source

Thrown at crates/kms/src/error.rs:75

    /// Invalid operation state
    #[error("Invalid operation: {message}")]
    InvalidOperation { message: String },

    /// Internal error
    #[error("Internal error: {message}")]
    InternalError { message: String },

    /// Serialization/deserialization error
    #[error("Serialization error: {message}")]
    SerializationError { message: String },

    /// I/O error
    #[error("I/O error: {message}")]
    IoError { message: String },

    /// Cache error
    #[error("Cache error: {message}")]
    CacheError { message: String },

    /// Validation error
    #[error("Validation error: {message}")]
    ValidationError { message: String },

    /// Unsupported algorithm
    #[error("Unsupported algorithm: {algorithm}")]
    UnsupportedAlgorithm { algorithm: String },

    /// Invalid key size
    #[error("Invalid key size: expected {expected}, got {actual}")]
    InvalidKeySize { expected: usize, actual: usize },

    /// Encryption context mismatch
    #[error("Encryption context mismatch: {message}")]
    ContextMismatch { message: String },

View on GitHub (pinned to 35af688cd9)

Solutions

  1. Inspect the message for the cache-level failure
  2. Clear or restart the KMS cache/service if entries are stale or corrupted
  3. Report recurring cache errors with logs, as they may indicate a bug
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at crates/kms/src/error.rs:75 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of rustfs/rustfs@35af688cd9 (2026-08-20). Data as JSON: /api/errors/a7d299168ff66f2d. Report an issue: GitHub.