rustfs/rustfs · error · InvalidChecksum
invalid checksum
Error message
invalid checksum
What it means
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.
Source
Thrown at crates/rio/src/errors.rs:74
/// Checksum mismatch error - when content checksum does not match what was sent from client
#[derive(Error, Debug, Clone, PartialEq)]
#[error("Bad checksum: Want {want} does not match calculated {got}")]
pub struct ChecksumMismatch {
pub want: String,
pub got: String,
}
/// Request body ended before the declared size was fully read.
#[derive(Error, Debug, Clone, PartialEq)]
#[error("Incomplete body: {remaining} bytes were still expected")]
pub struct IncompleteBody {
pub remaining: i64,
}
/// Invalid checksum error
#[derive(Error, Debug, Clone, PartialEq)]
#[error("invalid checksum")]
pub struct InvalidChecksum;
/// Check if an error is a checksum mismatch
pub fn is_checksum_mismatch(err: &(dyn std::error::Error + 'static)) -> bool {
err.downcast_ref::<ChecksumMismatch>().is_some()
}
View on GitHub (pinned to 35af688cd9)
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
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/rio/src/errors.rs:74 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/4b22849508debc2d.
Report an issue: GitHub.