{"record":{"id":"3211eaa87356784f","repo":"Pumpkin-MC/Pumpkin","slug":"unknown-status-code-0","errorCode":null,"errorMessage":"Unknown Status Code {0}","messagePattern":"Unknown Status Code (.+?)","errorType":"exception","errorClass":"AuthError","httpStatus":null,"severity":"error","filePath":"crates/pumpkin/src/net/authentication.rs","lineNumber":407,"sourceCode":"        Err(AuthError::FailedResponse)\n    }\n}\n\n#[derive(Error, Debug)]\npub enum AuthError {\n    #[error(\"Authentication servers are down\")]\n    FailedResponse,\n    #[error(\"Failed to verify username\")]\n    UnverifiedUsername,\n    #[error(\"You are banned from Authentication servers\")]\n    Banned,\n    #[error(\"Texture Error {0}\")]\n    TextureError(TextureError),\n    #[error(\"You have disallowed actions from Authentication servers\")]\n    DisallowedAction,\n    #[error(\"Failed to parse JSON into Game Profile\")]\n    FailedParse,\n    #[error(\"Unknown Status Code {0}\")]\n    UnknownStatusCode(StatusCode),\n}\n\n#[derive(Error, Debug)]\npub enum TextureError {\n    #[error(\"Invalid URL\")]\n    InvalidURL,\n    #[error(\"Invalid URL scheme for player texture: {0}\")]\n    DisallowedUrlScheme(String),\n    #[error(\"Invalid URL domain for player texture: {0}\")]\n    DisallowedUrlDomain(String),\n    #[error(\"Failed to decode base64 player texture: {0}\")]\n    DecodeError(String),\n    #[error(\"Failed to parse JSON from player texture: {0}\")]\n    JSONError(String),\n}\n\n#[cfg(test)]","sourceCodeStart":389,"sourceCodeEnd":425,"githubUrl":"https://github.com/Pumpkin-MC/Pumpkin/blob/8d4639e25a57c15e47448ec327c780d41bbf2356/crates/pumpkin/src/net/authentication.rs#L389-L425","documentation":"PacketError::FailedSend(std::io::Error) wraps the underlying I/O error that occurred while writing an RCON packet to the socket. The variant preserves the original io::Error so callers can inspect the OS-level cause (broken pipe, connection reset, etc.). It means the packet was never fully transmitted.","triggerScenarios":"Writing an RCON packet to a socket whose peer has closed (broken pipe / ECONNRESET); any io::Error surfacing during the send path of the RCON client/server.","commonSituations":"Server restarting or dropping the RCON connection while a command is being sent; firewall/network interruption mid-write; writing to an already-closed TCP stream.","solutions":["Inspect the wrapped io::Error kind (BrokenPipe, ConnectionReset, TimedOut) and reconnect if the connection is dead.","Retry the command on a freshly established RCON connection.","Check that the RCON server is running and the port/firewall allow the connection.","Avoid sharing the RCON connection across threads without synchronization to prevent interleaved failed writes."],"exampleFix":"// before\nstream.write_all(&packet_bytes).await?; // generic io error, no context\n// after\nstream.write_all(&packet_bytes).await\n    .map_err(PacketError::FailedSend)?;","handlingStrategy":"retry","validationCode":"fn can_send(conn: &RconConnection) -> bool {\n    !conn.is_closed()\n}","typeGuard":null,"tryCatchPattern":"match rcon_conn.send(&packet).await {\n    Err(PacketError::FailedSend(io)) if matches!(io.kind(), io::ErrorKind::BrokenPipe | io::ErrorKind::ConnectionReset) => {\n        warn!(\"RCON connection lost ({io}); reconnecting\");\n        rcon_conn = RconConnection::connect(addr).await?;\n        rcon_conn.send(&packet).await?;\n    }\n    Err(e) => return Err(e),\n    Ok(_) => {}\n}","preventionTips":["Check connection health before sending commands.","Inspect the wrapped io::Error kind to pick retry vs abort.","Reconnect and resend once on broken-pipe/reset errors.","Serialize sends through one task/lock to avoid interleaved writes."],"tags":["rcon","io","network","tcp-write"],"backgroundTag":"broken-pipe","analyzedSha":"8d4639e25a57c15e47448ec327c780d41bbf2356","analyzedAt":"2026-09-09T15:32:22.916Z","contentChangedAt":"2026-09-09T15:32:22.916Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}