{"record":{"id":"1cedef65302a16c8","repo":"affaan-m/ECC","slug":"context-graph-entity-not-found-entity-id","errorCode":null,"errorMessage":"Context graph entity not found: {entity_id}","messagePattern":"Context graph entity not found: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"ecc2/src/main.rs","lineNumber":2540,"sourceCode":"                    db.recall_context_entities(resolved_session_id.as_deref(), &query, limit)?;\n                if json {\n                    println!(\"{}\", serde_json::to_string_pretty(&entries)?);\n                } else {\n                    println!(\n                        \"{}\",\n                        format_graph_recall_human(&entries, resolved_session_id.as_deref(), &query)\n                    );\n                }\n            }\n            GraphCommands::Show {\n                entity_id,\n                limit,\n                json,\n            } => {\n                let detail = db\n                    .get_context_entity_detail(entity_id, limit)?\n                    .ok_or_else(|| {\n                        anyhow::anyhow!(\"Context graph entity not found: {entity_id}\")\n                    })?;\n                if json {\n                    println!(\"{}\", serde_json::to_string_pretty(&detail)?);\n                } else {\n                    println!(\"{}\", format_graph_entity_detail_human(&detail));\n                }\n            }\n            GraphCommands::Sync {\n                session_id,\n                all,\n                limit,\n                json,\n            } => {\n                if all && session_id.is_some() {\n                    return Err(anyhow::anyhow!(\n                        \"graph sync does not accept a session ID when --all is set\"\n                    ));\n                }","sourceCodeStart":2522,"sourceCodeEnd":2558,"githubUrl":"https://github.com/affaan-m/ECC/blob/01e15490f04e29cfefe3896951f43db46994d8ee/ecc2/src/main.rs#L2522-L2558","documentation":"Returned by the `graph show` subcommand when `db.get_context_entity_detail(entity_id, limit)` yields `None`. The detail query joins entity metadata with its observations/edges; a `None` result means no context-graph entity matches the given `entity_id`. The CLI surfaces this as a hard error rather than printing an empty detail view.","triggerScenarios":"Running `ecc graph show <id>` for an ID that was never ingested or has been pruned. Supplying a string ID whose format does not match the stored entity identifier scheme. Querying an entity created by a connector that has not been synced yet.","commonSituations":"Fresh workspace with no graph data ingested. Pointing at a state DB from a different project. Entity IDs from `graph search`/`graph recall` that have since expired from the retention window.","solutions":["List/search entities first with `ecc graph entities` or `ecc graph recall <query>` to obtain a valid ID.","Run `ecc graph sync` (and any relevant `graph connectors sync`) to populate the entity.","Verify the entity ID format matches what `graph entities` emits (numeric vs. slug vs. hash)."],"exampleFix":"// before\necc graph show nonexistent-entity\n\n// after\necc graph entities | grep <term>\necc graph show <real-entity-id>","handlingStrategy":"validation","validationCode":"// Verify entity exists before show\nif db.get_context_entity_detail(entity_id, 1)?.is_none() {\n    eprintln!(\"entity {entity_id} not found; listing:\");\n    print_entities(&db)?;\n    return Ok(());\n}","typeGuard":null,"tryCatchPattern":"match db.get_context_entity_detail(entity_id, limit)? {\n    Some(detail) => print_detail(detail),\n    None => { eprintln!(\"entity not found: {entity_id}\"); std::process::exit(1); }\n}","preventionTips":["Source entity IDs only from current `graph entities` / `graph recall` output.","Re-sync graph data after resets before referencing old IDs.","Match the ID format exactly (numeric vs slug) as emitted by the listing command."],"tags":["graph","entity","database"],"backgroundTag":null,"analyzedSha":"01e15490f04e29cfefe3896951f43db46994d8ee","analyzedAt":"2026-08-13T00:31:08.655Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}