Pumpkin-MC/Pumpkin · error · PacketDecodeError

packet is uncompressed but greater than the threshold

Error message

packet is uncompressed but greater than the threshold

What it means

PacketDecodeError variant raised when an inbound packet claims to be uncompressed yet is larger than the compression threshold — a protocol violation used to prevent bypassing the size/compression contract.

Solutions

  1. Disconnect the violating client
  2. Verify compression is enabled and threshold agreed in the login flow
  3. Log the violation at debug level
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/pumpkin-protocol/src/lib.rs:311 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Pumpkin-MC/Pumpkin@8d4639e25a (2026-09-09). Data as JSON: /api/errors/e64d64907a9fd453. Report an issue: GitHub.

Appendix: source

Thrown at crates/pumpkin-protocol/src/lib.rs:311

    #[error("Compression failed {0}")]
    CompressionFailed(String),
    #[error("Writing packet failed: {0}")]
    Message(String),
}

#[derive(Error, Debug)]
pub enum PacketDecodeError {
    #[error("failed to decode packet ID")]
    DecodeID,
    #[error("packet exceeds maximum length")]
    TooLong,
    #[error("packet length is out of bounds")]
    OutOfBounds,
    #[error("malformed packet length VarInt: {0}")]
    MalformedLength(String),
    #[error("failed to decompress packet: {0}")]
    FailedDecompression(String), // Updated to include error details
    #[error("packet is uncompressed but greater than the threshold")]
    NotCompressed,
    #[error("the connection has closed")]
    ConnectionClosed,
    #[error("{0}")]
    Message(String),
}

impl From<ReadingError> for PacketDecodeError {
    fn from(value: ReadingError) -> Self {
        Self::FailedDecompression(value.to_string())
    }
}

#[derive(Clone, serde::Serialize)]
#[serde(rename_all = "camelCase")]
pub struct StatusResponse {
    /// The version on which the server is running. (Optional)
    pub version: Option<Version>,

View on GitHub (pinned to 8d4639e25a)