{"record":{"id":"81ecc39fd40c9fe2","repo":"NousResearch/hermes-agent","slug":"bws-returned-non-json-output-exc","errorCode":null,"errorMessage":"bws returned non-JSON output: {exc}","messagePattern":"bws returned non-JSON output: (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"agent/secret_sources/bitwarden.py","lineNumber":724,"sourceCode":"\n    if proc.returncode != 0:\n        # bws writes auth/network errors to stderr as a Rust error-report\n        # dump (color-eyre): an \"Error:\" header, indented cause lines, then\n        # \"Location:\" / \"Backtrace omitted\" noise.  Strip ANSI and boil it\n        # down to the meaningful cause line(s) before surfacing.\n        err = _summarize_bws_stderr(proc.stderr or proc.stdout or \"\")\n        raise RuntimeError(\n            f\"bws exited {proc.returncode}: {err[:200]}\"\n        )\n\n    raw = proc.stdout.strip()\n    if not raw:\n        return {}, [\"bws returned no output (empty project?)\"]\n\n    try:\n        payload = json.loads(raw)\n    except json.JSONDecodeError as exc:\n        raise RuntimeError(f\"bws returned non-JSON output: {exc}\") from exc\n\n    if not isinstance(payload, list):\n        raise RuntimeError(\n            f\"bws returned unexpected shape: {type(payload).__name__}\"\n        )\n\n    secrets: Dict[str, str] = {}\n    warnings: List[str] = []\n    for item in payload:\n        if not isinstance(item, dict):\n            continue\n        key = item.get(\"key\")\n        value = item.get(\"value\")\n        if not isinstance(key, str) or not isinstance(value, str):\n            continue\n        if not _is_valid_env_name(key):\n            warnings.append(\n                f\"Skipping secret {key!r}: not a valid env-var name\"","sourceCodeStart":706,"sourceCodeEnd":742,"githubUrl":"https://github.com/NousResearch/hermes-agent/blob/c896c09c42910c584c4c7d2325b58c14713ea42c/agent/secret_sources/bitwarden.py#L706-L742","documentation":"Error \"bws returned non-JSON output: {exc}\" thrown in NousResearch/hermes-agent.","triggerScenarios":"Thrown at agent/secret_sources/bitwarden.py:724 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Upgrade or reinstall bws; its output was not valid JSON for this command.","Run the bws command manually to see the raw output and diagnose."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c896c09c42910c584c4c7d2325b58c14713ea42c","analyzedAt":"2026-08-14T17:18:01.089Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}