{"record":{"id":"24553511f5bf0334","repo":"rustfs/rustfs","slug":"size-small-got-got-want-want","errorCode":null,"errorMessage":"Size small: got {got}, want {want}","messagePattern":"Size small: got (.+?), want (.+?)","errorType":"exception","errorClass":"SizeTooSmall","httpStatus":null,"severity":"error","filePath":"crates/rio/src/errors.rs","lineNumber":35,"sourceCode":"/// SHA256 mismatch error - when content SHA256 does not match what was sent from client\n#[derive(Error, Debug, Clone, PartialEq)]\n#[error(\"Bad sha256: Expected {expected_sha256} does not match calculated {calculated_sha256}\")]\npub struct Sha256Mismatch {\n    pub expected_sha256: String,\n    pub calculated_sha256: String,\n}\n\n/// Bad digest error - Content-MD5 you specified did not match what we received\n#[derive(Error, Debug, Clone, PartialEq)]\n#[error(\"Bad digest: Expected {expected_md5} does not match calculated {calculated_md5}\")]\npub struct BadDigest {\n    pub expected_md5: String,\n    pub calculated_md5: String,\n}\n\n/// Size too small error - reader size too small\n#[derive(Error, Debug, Clone, PartialEq)]\n#[error(\"Size small: got {got}, want {want}\")]\npub struct SizeTooSmall {\n    pub want: i64,\n    pub got: i64,\n}\n\n/// Size too large error - reader size too large\n#[derive(Error, Debug, Clone, PartialEq)]\n#[error(\"Size large: got {got}, want {want}\")]\npub struct SizeTooLarge {\n    pub want: i64,\n    pub got: i64,\n}\n\n/// Size mismatch error\n#[derive(Error, Debug, Clone, PartialEq)]\n#[error(\"Size mismatch: got {got}, want {want}\")]\npub struct SizeMismatch {\n    pub want: i64,","sourceCodeStart":17,"sourceCodeEnd":53,"githubUrl":"https://github.com/rustfs/rustfs/blob/35af688cd9d41b4346fbe27dcf7250ba72046c1f/crates/rio/src/errors.rs#L17-L53","documentation":"Typed error raised when a reader produced fewer bytes than the declared content length (got < want). Fires when the request body ends prematurely relative to Content-Length or the expected object size.","triggerScenarios":"Thrown at crates/rio/src/errors.rs:35 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Resend with a body matching the declared Content-Length","Fix premature stream termination in the upload path","Retry the request; transient truncation may clear"],"exampleFix":null,"handlingStrategy":"retry","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-14T05:17:10.506Z"}