{"record":{"id":"7333e39605dfc1b1","repo":"swc-project/swc","slug":"msg","errorCode":null,"errorMessage":"{msg}","messagePattern":"\\{msg\\}","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/swc_plugin_runner/src/transform_executor.rs","lineNumber":95,"sourceCode":"        // Arc<Mutex<T>>\n        drop(self.instance);\n        let transformed_result = Arc::try_unwrap(self.transform_result)\n            .map_err(|_| {\n                anyhow!(\"Failed to unwrap Arc: other references to transform_result exist\")\n            })?\n            .into_inner();\n        let ret = PluginSerializedBytes::from_bytes(transformed_result);\n\n        let ret = if returned_ptr_result == 0 {\n            Ok(ret)\n        } else {\n            let err: PluginError = ret.deserialize()?.into_inner();\n            match err {\n                PluginError::SizeInteropFailure(msg) => Err(anyhow!(\n                    \"Failed to convert pointer size to calculate: {msg}\"\n                )),\n                PluginError::Deserialize(msg) | PluginError::Serialize(msg) => {\n                    Err(anyhow!(\"{msg}\"))\n                }\n                _ => Err(anyhow!(\n                    \"Unexpected error occurred while running plugin transform\"\n                )),\n            }\n        };\n\n        ret\n    }\n\n    /**\n     * Check compile-time version of AST schema between the plugin and\n     * the host. Returns true if it's compatible, false otherwise.\n     *\n     * Host should appropriately handle if plugin is not compatible to the\n     * current runtime.\n     */\n    #[allow(unreachable_code)]","sourceCodeStart":77,"sourceCodeEnd":113,"githubUrl":"https://github.com/swc-project/swc/blob/5176682b65416c6b5de6b47379ae1588ea3ecb3f/crates/swc_plugin_runner/src/transform_executor.rs#L77-L113","documentation":"The runner deserialized a PluginError from the bytes returned by the plugin and re-raises its embedded message verbatim as an anyhow error. The text comes from the plugin itself, so any plugin-side failure surfaces here with whatever detail the plugin chose to report.","triggerScenarios":"Thrown at crates/swc_plugin_runner/src/transform_executor.rs:95 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the embedded message to identify the failing plugin and its cause","Catch the error at the transform call site and continue without the plugin if it is optional","Fix or update the plugin that produced the PluginError"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5176682b65416c6b5de6b47379ae1588ea3ecb3f","analyzedAt":"2026-08-17T16:16:52.067Z","contentChangedAt":"2026-08-17T16:16:52.067Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}