{"record":{"id":"b503a2952d279ffc","repo":"Pumpkin-MC/Pumpkin","slug":"sent-an-oversized-message","errorCode":null,"errorMessage":"sent an oversized message","messagePattern":"sent an oversized message","errorType":"error_code","errorClass":"ChatError","httpStatus":null,"severity":"error","filePath":"crates/pumpkin/src/net/java/play/mod.rs","lineNumber":126,"sourceCode":"    fn severity(&self) -> Level {\n        match self {\n            Self::BlockOutOfWorld | Self::InvalidGamemode => Level::TRACE,\n            Self::BlockOutOfReach | Self::InvalidBlockFace | Self::InvalidHand => Level::WARN,\n        }\n    }\n\n    fn client_kick_reason(&self) -> Option<String> {\n        match self {\n            Self::BlockOutOfReach | Self::BlockOutOfWorld | Self::InvalidGamemode => None,\n            Self::InvalidBlockFace => Some(\"Invalid block face\".into()),\n            Self::InvalidHand => Some(\"Invalid hand\".into()),\n        }\n    }\n}\n\n#[derive(Debug, Error)]\npub enum ChatError {\n    #[error(\"sent an oversized message\")]\n    OversizedMessage,\n    #[error(\"sent a message with illegal characters\")]\n    IllegalCharacters,\n    #[error(\"sent a chat with invalid/no signature\")]\n    UnsignedChat,\n    #[error(\"has too many unacknowledged chats queued\")]\n    TooManyPendingChats,\n    #[error(\"sent a chat that couldn't be validated\")]\n    ChatValidationFailed,\n    #[error(\"sent a chat with an out of order timestamp\")]\n    OutOfOrderChat,\n    #[error(\"has an expired public key\")]\n    ExpiredPublicKey,\n    #[error(\"attempted to initialize a session with an invalid public key\")]\n    InvalidPublicKey,\n}\n\nimpl PumpkinError for ChatError {","sourceCodeStart":108,"sourceCodeEnd":144,"githubUrl":"https://github.com/Pumpkin-MC/Pumpkin/blob/8d4639e25a57c15e47448ec327c780d41bbf2356/crates/pumpkin/src/net/java/play/mod.rs#L108-L144","documentation":"ChatError variant raised when a client sends a signed chat message whose serialized size exceeds the protocol limit. It is a per-player protocol violation that typically triggers a kick of that player.","triggerScenarios":"Thrown at crates/pumpkin/src/net/java/play/mod.rs:126 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Kick the offending player","Log the violation at warn level with the player name","Enforce a maximum chat message length before processing"],"exampleFix":null,"handlingStrategy":"validation","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"}