{"record":{"id":"2bdfa0bfba78f231","repo":"nikivdev/code","slug":"error-2bdfa0","errorCode":null,"errorMessage":"{}","messagePattern":"\\{\\}","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/jd.rs","lineNumber":143,"sourceCode":"    let err = std::io::Error::last_os_error();\n    let raw = err.raw_os_error();\n    if raw == Some(libc::EWOULDBLOCK) || raw == Some(libc::EAGAIN) {\n        bail!(\"jd already holds {}\", lock_path()?.display());\n    }\n    Err(err).context(\"failed to lock jd process lock\")\n}\n\n#[cfg(not(unix))]\nfn acquire_process_lock(_file: &std::fs::File) -> Result<()> {\n    Ok(())\n}\n\npub fn ping() -> Result<()> {\n    let response = send_request(&CodexdRequest::Ping)?;\n    if response.ok {\n        Ok(())\n    } else {\n        bail!(\n            \"{}\",\n            response\n                .message\n                .unwrap_or_else(|| \"jd ping failed\".to_string())\n        )\n    }\n}\n\npub fn is_running() -> bool {\n    ping().is_ok()\n}\n\npub fn ensure_running() -> Result<()> {\n    if is_running() {\n        return Ok(());\n    }\n    stop_legacy_codexd().ok();\n    supervisor::ensure_daemon_running(JD_NAME, None, false)","sourceCodeStart":125,"sourceCodeEnd":161,"githubUrl":"https://github.com/nikivdev/code/blob/a747e741ae92c09071d0ae946ab48488adcff1ce/src/jd.rs#L125-L161","documentation":"Error \"{}\" thrown in nikivdev/code.","triggerScenarios":"Thrown at src/jd.rs:143 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":"a747e741ae92c09071d0ae946ab48488adcff1ce","analyzedAt":"2026-09-01T22:43:55.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}