{"record":{"id":"349c127d631225dc","repo":"nikivdev/code","slug":"beads-create-failed","errorCode":null,"errorMessage":"beads create failed: {}","messagePattern":"beads create failed: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/commit.rs","lineNumber":13528,"sourceCode":"        .arg(\"--no-auto-import\")\n        .env(\"BEADS_DIR\", beads_dir)\n        .output()\n        .context(\"run br create\")?;\n\n    if output.status.success() {\n        return Ok(true);\n    }\n    if br_create_failed_due_to_duplicate_external_ref(&output) {\n        return Ok(false);\n    }\n    let stderr = String::from_utf8_lossy(&output.stderr);\n    let stdout = String::from_utf8_lossy(&output.stdout);\n    let msg = if stderr.trim().is_empty() {\n        stdout.trim()\n    } else {\n        stderr.trim()\n    };\n    bail!(\"beads create failed: {}\", msg);\n}\n\nfn infer_review_bead_priority(issue: &str) -> u8 {\n    let lower = issue.to_lowercase();\n    if lower.contains(\"secret\")\n        || lower.contains(\"credential\")\n        || lower.contains(\"api key\")\n        || lower.contains(\"injection\")\n        || lower.contains(\"vulnerability\")\n    {\n        return 0; // critical\n    }\n    if lower.contains(\"crash\")\n        || lower.contains(\"data loss\")\n        || lower.contains(\"race condition\")\n        || lower.contains(\"buffer overflow\")\n    {\n        return 1; // high","sourceCodeStart":13510,"sourceCodeEnd":13546,"githubUrl":"https://github.com/nikivdev/code/blob/a747e741ae92c09071d0ae946ab48488adcff1ce/src/commit.rs#L13510-L13546","documentation":"Thrown when an invocation of the external `beads create` command exits non-zero. The error message embeds whichever of stderr or stdout is non-empty, so the text of this error is the tool's own diagnostic output. It surfaces external CLI failures as anyhow errors in this library's flow.","triggerScenarios":"Running `beads create <issue>` via Command when the beads CLI exits with a failure status — e.g. invalid arguments, beads not installed, or beads reporting a data/database problem on stderr.","commonSituations":"beads binary missing or an old version on PATH, malformed issue title arguments (unescaped quotes/spaces), corrupted beads database, or running outside a directory beads is initialized in.","solutions":["Read the embedded message — it contains beads' own stderr/stdout diagnostics","Run the same `beads create ...` command manually to reproduce and see full output","Check `beads --version` and that the binary is installed and on PATH","Verify arguments (quoting of issue titles with spaces/special chars) and that beads is initialized in this repo"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// verify beads is available before calling create\nif which::which(\"beads\").is_err() {\n    eprintln!(\"beads CLI not found on PATH\");\n    std::process::exit(1);\n}","typeGuard":null,"tryCatchPattern":"match beads_create(&issue) {\n    Err(e) => {\n        eprintln!(\"beads create failed: {e:#}\");\n        eprintln!(\"Check beads is installed, initialized, and the issue text is valid.\");\n    }\n    Ok(_) => {}\n}","preventionTips":["Install/keep beads on PATH and pin its version in dev docs","Quote issue titles with spaces/special characters","Run `beads init` in each repo that uses beads tracking","Reproduce failures by running the same beads command manually"],"tags":["external-process","cli","beads"],"backgroundTag":"external-command-failed","analyzedSha":"a747e741ae92c09071d0ae946ab48488adcff1ce","analyzedAt":"2026-09-01T22:43:55.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}