{"record":{"id":"4b22849508debc2d","repo":"rustfs/rustfs","slug":"invalid-checksum-4b2284","errorCode":null,"errorMessage":"invalid checksum","messagePattern":"invalid checksum","errorType":"exception","errorClass":"InvalidChecksum","httpStatus":null,"severity":"error","filePath":"crates/rio/src/errors.rs","lineNumber":74,"sourceCode":"\n/// Checksum mismatch error - when content checksum does not match what was sent from client\n#[derive(Error, Debug, Clone, PartialEq)]\n#[error(\"Bad checksum: Want {want} does not match calculated {got}\")]\npub struct ChecksumMismatch {\n    pub want: String,\n    pub got: String,\n}\n\n/// Request body ended before the declared size was fully read.\n#[derive(Error, Debug, Clone, PartialEq)]\n#[error(\"Incomplete body: {remaining} bytes were still expected\")]\npub struct IncompleteBody {\n    pub remaining: i64,\n}\n\n/// Invalid checksum error\n#[derive(Error, Debug, Clone, PartialEq)]\n#[error(\"invalid checksum\")]\npub struct InvalidChecksum;\n\n/// Check if an error is a checksum mismatch\npub fn is_checksum_mismatch(err: &(dyn std::error::Error + 'static)) -> bool {\n    err.downcast_ref::<ChecksumMismatch>().is_some()\n}\n","sourceCodeStart":56,"sourceCodeEnd":81,"githubUrl":"https://github.com/rustfs/rustfs/blob/35af688cd9d41b4346fbe27dcf7250ba72046c1f/crates/rio/src/errors.rs#L56-L81","documentation":"Sentinel typed error for an unrecognized or malformed checksum specification in request headers — the checksum type cannot be resolved to a known algorithm or the value cannot be parsed. The at-fault input is the client's checksum header content.","triggerScenarios":"Thrown at crates/rio/src/errors.rs:74 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Send checksums as base64 of the correct byte length for the type","Use a supported checksum algorithm (CRC32/CRC32C/SHA1/SHA256)","Reject the request as InvalidRequest"],"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"}