{"record":{"id":"3d3b41b57b2d1324","repo":"swc-project/swc","slug":"failed-to-handle-s","errorCode":null,"errorMessage":"failed to handle: {s}","messagePattern":"failed to handle: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"bindings/binding_core_node/src/util.rs","lineNumber":55,"sourceCode":"    GLOBALS\n        .set(&Default::default(), || {\n            try_with_handler(\n                cm,\n                swc_core::base::HandlerOpts {\n                    skip_filename,\n                    ..Default::default()\n                },\n                |handler| {\n                    //\n                    let result = catch_unwind(AssertUnwindSafe(|| op(handler)));\n\n                    let p = match result {\n                        Ok(v) => return v,\n                        Err(v) => v,\n                    };\n\n                    if let Some(s) = p.downcast_ref::<String>() {\n                        Err(anyhow!(\"failed to handle: {s}\"))\n                    } else if let Some(s) = p.downcast_ref::<&str>() {\n                        Err(anyhow!(\"failed to handle: {s}\"))\n                    } else {\n                        Err(anyhow!(\"failed to handle with unknown panic message\"))\n                    }\n                },\n            )\n        })\n        .map_err(|e| e.to_pretty_error())\n}\n\n// This was originally under swc_nodejs_common, but this is not a public\n// interface for the custom binary - they should choose own trace initialization\n// instead. Will keep as hidden for now until there's proper usecase.\n\n/// Deprecated no-op kept for compatibility with existing binding entrypoints.\npub fn init_default_trace_subscriber() {}\n","sourceCodeStart":37,"sourceCodeEnd":73,"githubUrl":"https://github.com/swc-project/swc/blob/d7d74346665e36e692aa07e13d4ee3ee692ee35c/bindings/binding_core_node/src/util.rs#L37-L73","documentation":"Error \"failed to handle: {s}\" thrown in swc-project/swc.","triggerScenarios":"Thrown at bindings/binding_core_node/src/util.rs:55 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"d7d74346665e36e692aa07e13d4ee3ee692ee35c","analyzedAt":"2026-08-16T12:41:13.160Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}