File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -282,7 +282,7 @@ impl AppContextBuilder {
282282 . with_workflow_engine ( )
283283 . with_mcp_manager ( & router_config)
284284 . await ?
285- . with_wasm_manager ( & router_config)
285+ . with_wasm_manager ( & router_config) ?
286286 . router_config ( router_config) )
287287 }
288288
@@ -518,15 +518,16 @@ impl AppContextBuilder {
518518 }
519519
520520 /// Create wasm manager if enabled in config
521- fn with_wasm_manager ( mut self , config : & RouterConfig ) -> Self {
521+ fn with_wasm_manager ( mut self , config : & RouterConfig ) -> Result < Self , String > {
522522 self . wasm_manager = if config. enable_wasm {
523523 Some ( Arc :: new (
524- WasmModuleManager :: new ( WasmRuntimeConfig :: default ( ) ) . unwrap ( ) ,
524+ WasmModuleManager :: new ( WasmRuntimeConfig :: default ( ) )
525+ . map_err ( |e| format ! ( "Failed to initialize WASM module manager: {}" , e) ) ?,
525526 ) )
526527 } else {
527528 None
528529 } ;
529- self
530+ Ok ( self )
530531 }
531532}
532533
You can’t perform that action at this time.
0 commit comments