{"record":{"id":"c76cc5a5e454cf5a","repo":"sxyazi/yazi","slug":"unknown-error","errorCode":null,"errorMessage":"Unknown error","messagePattern":"Unknown error","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"yazi-cli/src/dds/exec.rs","lineNumber":34,"sourceCode":"\t\tlet req = cmd.body(*yazi_boot::ID)?;\n\t\tlet resp = Self::ask(\"dds-exec\", receiver, &req, \"dds-exec-result\").await?;\n\n\t\t#[derive(Deserialize)]\n\t\tstruct Body {\n\t\t\tok:    bool,\n\t\t\t#[serde(default)]\n\t\t\tvalue: Data,\n\t\t\t#[serde(default)]\n\t\t\terror: String,\n\t\t}\n\n\t\tlet body = Body::deserialize(&resp)?;\n\t\tif body.ok {\n\t\t\tOk(body.value)\n\t\t} else if !body.error.is_empty() {\n\t\t\tbail!(\"{}\", body.error)\n\t\t} else {\n\t\t\tbail!(\"Unknown error\")\n\t\t}\n\t}\n\n\t/// Send one custom message and wait for a matching custom reply.\n\tasync fn ask(kind: &str, receiver: Id, body: &str, reply_kind: &str) -> Result<Data> {\n\t\tEmber::validate(kind)?;\n\t\tEmber::validate(reply_kind)?;\n\n\t\tlet payload = try_format!(\n\t\t\t\"{}\\n{kind},{receiver},{ID},{body}\\n\",\n\t\t\tPayload::new(EmberHi::borrowed([reply_kind])),\n\t\t)?;\n\n\t\tlet (mut lines, mut writer) = Stream::connect().await?;\n\t\twriter.write_all(payload.as_bytes()).await?;\n\t\twriter.flush().await?;\n\t\tdrop(writer);\n","sourceCodeStart":16,"sourceCodeEnd":52,"githubUrl":"https://github.com/sxyazi/yazi/blob/5f901b886b14de1f17460b6e52e9de5d67f8aba9/yazi-cli/src/dds/exec.rs#L16-L52","documentation":"The fallback branch of `Dds::exec`: when the response reports `ok == false` but carries an empty `error` string, the client cannot surface a remote message and bails with the generic `Unknown error`. It indicates a malformed or opaque failure response from the Yazi DDS endpoint.","triggerScenarios":"The Yazi side sets `ok: false` without populating `body.error` — e.g. a panic/aborted handler or an older/newer build whose Body schema differs so the error field fails to populate.","commonSituations":"Version mismatch between `ya` and `yazi` causing deserialization to silently drop the error field; a Yazi bug that returns an empty error payload.","solutions":["Restart both `yazi` and all `ya` processes so versions and schemas match.","Check `YAZI_LOG=debug` output on the Yazi side to find the original failure that produced an empty error.","File an issue if a specific message reliably yields `ok:false` with an empty error — that is a server-side bug."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"match result {\n  Err(e) if e.to_string() == \"Unknown error\" => {\n    // opaque failure: check YAZI_LOG=debug output on the yazi side, then retry once\n    retry_once();\n  }\n  other => other,\n}","preventionTips":["Keep `ya` and `yazi` on identical builds so error payloads deserialize correctly.","Run with YAZI_LOG=debug on the yazi side to capture the original failure.","Report reproducible empty-error responses upstream as a yazi bug."],"tags":["ipc","dds","protocol"],"backgroundTag":"remote-request-failed","analyzedSha":"5f901b886b14de1f17460b6e52e9de5d67f8aba9","analyzedAt":"2026-09-02T18:38:25.566Z","contentChangedAt":"2026-09-02T18:38:25.566Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}