{"record":{"id":"9585c98be9b22922","repo":"perspective-dev/perspective","slug":"invalid-plugin-config","errorCode":null,"errorMessage":"Invalid plugin config","messagePattern":"Invalid plugin config","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"rust/perspective-viewer/src/rust/js/plugin.rs","lineNumber":213,"sourceCode":"        force: bool\n    ) -> ApiResult<()>;\n\n    #[wasm_bindgen(method, catch, js_name = clear)]\n    async fn _clear(this: &JsPerspectiveViewerPlugin) -> ApiResult<JsValue>;\n\n    #[wasm_bindgen(method, catch, js_name = resize)]\n    async fn _resize(this: &JsPerspectiveViewerPlugin) -> ApiResult<JsValue>;\n\n    #[wasm_bindgen(method, catch, js_name = deselect)]\n    async fn _deselect(this: &JsPerspectiveViewerPlugin) -> ApiResult<()>;\n\n    #[wasm_bindgen(method, catch, js_name = presize)]\n    async fn _presize(this: &JsPerspectiveViewerPlugin, width: f64, height: f64) -> ApiResult<JsValue>;\n}\n\nimpl From<JsPluginStaticConfig> for PluginStaticConfig {\n    fn from(value: JsPluginStaticConfig) -> Self {\n        value.into_serde_ext().expect(\"Invalid plugin config\")\n    }\n}\n\n/// Which OPTIONAL plugin methods a plugin implements (see \"Capability\n/// tiers\" on [`JsPerspectiveViewerPlugin`]). Detected once per\n/// custom-element tag — methods live on the class prototype, so every\n/// instance of a tag answers identically — and memoized; call sites read\n/// cached flags instead of running per-call `Reflect` probes.\n#[derive(Clone, Copy, Debug, Default)]\npub struct PluginCapabilities {\n    pub draw: bool,\n    pub update: bool,\n    pub resize: bool,\n    pub restyle: bool,\n    pub clear: bool,\n    pub deselect: bool,\n    pub presize: bool,\n    pub render: bool,","sourceCodeStart":195,"sourceCodeEnd":231,"githubUrl":"https://github.com/perspective-dev/perspective/blob/11c8238c0c9c0b9e490b5a6a2dc277afad1e980a/rust/perspective-viewer/src/rust/js/plugin.rs#L195-L231","documentation":"The wasm_bindgen TryFromJsValue-style conversion for a viewer plugin's config object fails when the JS value passed (e.g. to restore() or a plugin setter) does not match the expected plugin config shape — wrong type, missing fields, or a non-object. The generic message reports the failed deserialization into the Rust config struct.","triggerScenarios":"Thrown at rust/perspective-viewer/src/rust/js/plugin.rs:213 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the JS value being converted; ensure it matches the plugin's expected config schema","Use the plugin's own save()/restore() round-trip to produce valid config objects","Validate the config JSON before passing it across the JS/WASM boundary"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"11c8238c0c9c0b9e490b5a6a2dc277afad1e980a","analyzedAt":"2026-09-09T00:35:19.377Z","contentChangedAt":"2026-09-09T00:35:19.377Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}