{"record":{"id":"a7b8d718a0340841","repo":"rustfs/rustfs","slug":"backup-manifest-truncated-reason","errorCode":null,"errorMessage":"backup manifest truncated: {reason}","messagePattern":"backup manifest truncated: (.+?)","errorType":"exception","errorClass":"BackupError","httpStatus":null,"severity":"error","filePath":"crates/kms/src/backup/error.rs","lineNumber":34,"sourceCode":"\nuse thiserror::Error;\n\n/// Typed failures raised while decoding or validating a backup bundle.\n///\n/// Every variant is a fail-closed condition: a restore surface observing any\n/// of them must abort before touching target state. Messages carry only\n/// identifiers (backup ids, KEK ids, artifact kinds and paths) — never key\n/// material, bundle plaintext, or credentials.\n#[derive(Error, Debug, Clone, PartialEq, Eq)]\npub enum BackupError {\n    /// Manifest or bundle content fails structural, schema, or integrity\n    /// validation (unknown fields, duplicate fields, digest mismatch,\n    /// contradictory responsibility declarations, ...).\n    #[error(\"backup bundle corrupted: {reason}\")]\n    Corrupted { reason: String },\n\n    /// Input ended before a complete manifest could be decoded.\n    #[error(\"backup manifest truncated: {reason}\")]\n    Truncated { reason: String },\n\n    /// Manifest declares a format version this build does not understand.\n    /// Unknown versions are always rejected; there is no best-effort read.\n    #[error(\"unknown backup manifest format version {found} (this build supports version {supported})\")]\n    UnknownVersion { found: u32, supported: u32 },\n\n    /// Bundle is protected by a different backup KEK than the one supplied.\n    #[error(\n        \"backup bundle requires KEK '{required_kek_id}' version {required_kek_version}; \\\n         supplied KEK '{supplied_kek_id}' version {supplied_kek_version} cannot open it\"\n    )]\n    WrongKek {\n        required_kek_id: String,\n        required_kek_version: u32,\n        supplied_kek_id: String,\n        supplied_kek_version: u32,\n    },","sourceCodeStart":16,"sourceCodeEnd":52,"githubUrl":"https://github.com/rustfs/rustfs/blob/35af688cd9d41b4346fbe27dcf7250ba72046c1f/crates/kms/src/backup/error.rs#L16-L52","documentation":"BackupError variant meaning the backup bundle's manifest input ended before a complete manifest could be decoded — truncated file, short read, or premature EOF. It is fail-closed: a restore surface observing it must abort before touching target state. The reason string carries where decoding stopped; messages include only identifiers, never key material.","triggerScenarios":"Thrown at crates/kms/src/backup/error.rs:34 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-transfer the bundle and check for truncation in transit/storage","Re-create the backup if the source is also incomplete"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"35af688cd9d41b4346fbe27dcf7250ba72046c1f","analyzedAt":"2026-08-20T21:57:04.799Z","contentChangedAt":"2026-08-20T21:57:04.799Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}