diff --git a/Backend/src/plugin_runtime/node_instance.rs b/Backend/src/plugin_runtime/node_instance.rs index 0fa5156..8a9ef87 100644 --- a/Backend/src/plugin_runtime/node_instance.rs +++ b/Backend/src/plugin_runtime/node_instance.rs @@ -78,7 +78,12 @@ impl NodeRpcProcess { self.next_request_id = self .next_request_id .checked_add(1) - .ok_or_else(|| "rpc request id overflow".to_string())?; + .ok_or_else(|| { + format!( + "plugin '{}' exhausted RPC request IDs after {} calls; restart of plugin runtime required", + plugin_id, request_id + ) + })?; let request = RpcRequest { jsonrpc: "2.0".to_string(), @@ -536,7 +541,13 @@ impl NodePluginRuntimeInstance { let config_value = if config.is_empty() { Value::Object(serde_json::Map::new()) } else { - serde_json::from_slice(config).unwrap_or_else(|_| Value::Object(serde_json::Map::new())) + match serde_json::from_slice(config) { + Ok(v) => v, + Err(e) => { + log::warn!("Failed to parse VCS open config as JSON, using empty object instead: {}", e); + Value::Object(serde_json::Map::new()) + } + } }; let result: OpenSessionResponse = self.rpc_call( Methods::VCS_OPEN,