{"record":{"id":"26dd062696a99679","repo":"Pumpkin-MC/Pumpkin","slug":"runtime-error-0","errorCode":null,"errorMessage":"Runtime error: {0}","messagePattern":"Runtime error: (.+?)","errorType":"error_code","errorClass":"LoaderError","httpStatus":null,"severity":"error","filePath":"crates/pumpkin/src/plugin/loader/mod.rs","lineNumber":51,"sourceCode":"    fn can_unload(&self) -> bool;\n}\n\n/// Unified loader error type\n#[derive(Error, Debug)]\npub enum LoaderError {\n    #[error(\"Failed to load library: {0}\")]\n    LibraryLoad(String),\n\n    #[error(\"Missing plugin metadata\")]\n    MetadataMissing,\n\n    #[error(\"Missing plugin entrypoint\")]\n    EntrypointMissing,\n\n    #[error(\"Plugin initialization failed: {0}\")]\n    InitializationFailed(String),\n\n    #[error(\"Runtime error: {0}\")]\n    RuntimeError(String),\n\n    #[error(\"Invalid loader data\")]\n    InvalidLoaderData,\n\n    #[error(\n        \"Plugin was built for an incompatible API version. Please rebuild it against this Pumpkin build.\"\n    )]\n    ApiVersionMissing,\n\n    #[error(\n        \"Plugin API version mismatch (plugin {plugin_version}, server {server_version}). Please rebuild it against this Pumpkin build.\"\n    )]\n    ApiVersionMismatch {\n        plugin_version: u32,\n        server_version: u32,\n    },\n","sourceCodeStart":33,"sourceCodeEnd":69,"githubUrl":"https://github.com/Pumpkin-MC/Pumpkin/blob/8d4639e25a57c15e47448ec327c780d41bbf2356/crates/pumpkin/src/plugin/loader/mod.rs#L33-L69","documentation":"This is LoaderError::RuntimeError(String). It means a previously loaded and initialized plugin raised an error at runtime — during event handling, command execution, or another callback — and the loader surfaced it wrapped in this variant with the message payload.","triggerScenarios":"Raised when a plugin's event handler, command handler, or scheduled task returns an error (or the loader's plugin call wrapper catches one) while the server is running.","commonSituations":"Plugin bug triggered by a specific event or command; plugin state corrupted after server reload; plugin interacting with world/entity data in an unexpected way; concurrency issues in the plugin.","solutions":["Read the inner message to identify which plugin and operation failed","Reproduce the trigger (specific command/event) and report it to the plugin author","Update the plugin to a fixed version or remove/disable it","Check server and plugin versions for compatibility"],"exampleFix":"null","handlingStrategy":"try-catch","validationCode":"null","typeGuard":"null","tryCatchPattern":"// isolate plugin callbacks so a runtime error cannot take down the server\nlet result = std::panic::catch_unwind(|| plugin.on_event(evt));\nif let Err(e) = result { warn!(\"plugin raised at runtime: {e:?}; disabling plugin\"); }","preventionTips":["Report plugin runtime errors with the trigger to the plugin author","Keep plugins updated to versions matching your server build","Disable failing plugins rather than letting them error every tick"],"tags":["plugin","loader","runtime","rust"],"backgroundTag":"plugin-runtime-error","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"}