{"record":{"id":"e0ce7efd205362c0","repo":"Pumpkin-MC/Pumpkin","slug":"you-have-disallowed-actions-from-authentication-se","errorCode":null,"errorMessage":"You have disallowed actions from Authentication servers","messagePattern":"You have disallowed actions from Authentication servers","errorType":"exception","errorClass":"AuthError","httpStatus":null,"severity":"error","filePath":"crates/pumpkin/src/net/authentication.rs","lineNumber":403,"sourceCode":"        Ok(None)\n    } else if let Some(status) = last_unknown_status {\n        Err(AuthError::UnknownStatusCode(status))\n    } else {\n        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}\")]","sourceCodeStart":385,"sourceCodeEnd":421,"githubUrl":"https://github.com/Pumpkin-MC/Pumpkin/blob/8d4639e25a57c15e47448ec327c780d41bbf2356/crates/pumpkin/src/net/authentication.rs#L385-L421","documentation":"PacketDecodeError::Message(String) is the catch-all variant carrying a free-form error message. It is used for decode failures that do not map to a specific variant, wrapping arbitrary error text. Treat the payload as diagnostic information rather than a stable contract.","triggerScenarios":"Any decode path returning a generic error string; errors wrapped via .map_err(|e| PacketDecodeError::Message(e.to_string())) in decoding helpers.","commonSituations":"Unexpected codec failures during development; mixing of error types from lower-level I/O surfaced through the catch-all; debugging custom protocol extensions.","solutions":["Log the message string to identify the actual underlying failure.","If it recurs, extend PacketDecodeError with a dedicated variant instead of relying on the catch-all.","Check the call stack/payload that produced the wrapped message for the root cause.","Upgrade or patch the protocol crate if the wrapped message indicates an internal bug."],"exampleFix":"// before\nreturn Err(PacketDecodeError::Message(format!(\"unknown state {:?}\", state)));\n// after\n#[error(\"unknown connection state: {0}\")]\nUnknownState(String),\nreturn Err(PacketDecodeError::UnknownState(state));","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"match decode_packet(stream).await {\n    Err(PacketDecodeError::Message(msg)) => {\n        error!(\"packet decode failed: {msg}\");\n        // inspect msg for the root cause; consider a dedicated variant if recurring\n    }\n    Ok(p) => handle(p),\n    Err(e) => warn!(\"decode error: {e}\"),\n}","preventionTips":["Prefer dedicated error variants over the Message catch-all for known failure modes.","Always log the wrapped message — it is the only diagnostic available.","Avoid stringly-typed wrapping in new code paths.","Review call sites that produce Message to find the underlying root cause."],"tags":["protocol","packet-decoding","catch-all"],"backgroundTag":"internal-invariant-violation","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"}