{"record":{"id":"b55edde89da64c94","repo":"Pumpkin-MC/Pumpkin","slug":"failed-to-decompress-packet-0","errorCode":null,"errorMessage":"failed to decompress packet: {0}","messagePattern":"failed to decompress packet: (.+?)","errorType":"exception","errorClass":"PacketDecodeError","httpStatus":null,"severity":"error","filePath":"crates/pumpkin-protocol/src/lib.rs","lineNumber":309,"sourceCode":"    #[error(\"Packet exceeds maximum length: {0}\")]\n    TooLong(usize),\n    #[error(\"Compression failed {0}\")]\n    CompressionFailed(String),\n    #[error(\"Writing packet failed: {0}\")]\n    Message(String),\n}\n\n#[derive(Error, Debug)]\npub enum PacketDecodeError {\n    #[error(\"failed to decode packet ID\")]\n    DecodeID,\n    #[error(\"packet exceeds maximum length\")]\n    TooLong,\n    #[error(\"packet length is out of bounds\")]\n    OutOfBounds,\n    #[error(\"malformed packet length VarInt: {0}\")]\n    MalformedLength(String),\n    #[error(\"failed to decompress packet: {0}\")]\n    FailedDecompression(String), // Updated to include error details\n    #[error(\"packet is uncompressed but greater than the threshold\")]\n    NotCompressed,\n    #[error(\"the connection has closed\")]\n    ConnectionClosed,\n    #[error(\"{0}\")]\n    Message(String),\n}\n\nimpl From<ReadingError> for PacketDecodeError {\n    fn from(value: ReadingError) -> Self {\n        Self::FailedDecompression(value.to_string())\n    }\n}\n\n#[derive(Clone, serde::Serialize)]\n#[serde(rename_all = \"camelCase\")]\npub struct StatusResponse {","sourceCodeStart":291,"sourceCodeEnd":327,"githubUrl":"https://github.com/Pumpkin-MC/Pumpkin/blob/8d4639e25a57c15e47448ec327c780d41bbf2356/crates/pumpkin-protocol/src/lib.rs#L291-L327","documentation":"PacketDecodeError variant from the compression layer: after reading and framing a compressed packet, zlib/inflate decompression of its body failed. The offending input is the compressed payload bytes of the packet — corrupted in transit, produced by a protocol-incompatible peer, or a framing misalignment.","triggerScenarios":"Thrown at crates/pumpkin-protocol/src/lib.rs:309 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Disconnect the client sending corrupt compressed data","Check compression threshold and settings match the client","Log the decompression error at debug level"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8d4639e25a57c15e47448ec327c780d41bbf2356","analyzedAt":"2026-09-09T15:32:22.916Z","contentChangedAt":"2026-09-09T15:32:22.916Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}