{"record":{"id":"41216266b0e551f6","repo":"d2lang/d2","slug":"v-not-found","errorCode":null,"errorMessage":"%v not found","messagePattern":"(.+?) not found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"d2oracle/get.go","lineNumber":99,"sourceCode":"\t\t}\n\t}\n\n\treturn false\n}\n\nfunc GetChildrenIDs(g *d2graph.Graph, boardPath []string, absID string) (ids []string, _ error) {\n\tg = GetBoardGraph(g, boardPath)\n\tif g == nil {\n\t\treturn nil, fmt.Errorf(\"board at path %v not found\", boardPath)\n\t}\n\n\tmk, err := d2parser.ParseMapKey(absID)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tobj, ok := g.Root.HasChild(d2graph.Key(mk.Key))\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"%v not found\", absID)\n\t}\n\n\tfor _, ch := range obj.ChildrenArray {\n\t\tids = append(ids, ch.AbsID())\n\t}\n\n\treturn ids, nil\n}\n\nfunc GetParentID(g *d2graph.Graph, boardPath []string, absID string) (string, error) {\n\tg = GetBoardGraph(g, boardPath)\n\tif g == nil {\n\t\treturn \"\", fmt.Errorf(\"board at path %v not found\", boardPath)\n\t}\n\n\tmk, err := d2parser.ParseMapKey(absID)\n\tif err != nil {\n\t\treturn \"\", err","sourceCodeStart":81,"sourceCodeEnd":117,"githubUrl":"https://github.com/d2lang/d2/blob/0d69dca6f532ceaeacd615d35d1eaa41a238ffdb/d2oracle/get.go#L81-L117","documentation":"After the board is resolved, GetChildrenIDs parses absID into a map key and looks it up with g.Root.HasChild. If no object with that absolute ID exists under the board root, it returns \"%v not found\" with the raw absID. This means the object ID you asked about is not a node on the resolved board.","triggerScenarios":"Calling d2oracle.GetChildrenIDs(g, boardPath, absID) with an absID such as \"root.server.internal\" that does not exist on that board, or an ID belonging to a different board, or a malformed key that parses but matches no object.","commonSituations":"Object was renamed or deleted; ID built without the root prefix or with the wrong separator; querying children of an object on board A using an ID from board B; using a rendered label instead of the actual key as the ID.","solutions":["Confirm the exact object exists (e.g. via d2oracle.GetObj or by searching the D2 script) and use its AbsID().","Check you are querying on the correct boardPath — the object may live on another board.","Rebuild the absID with the proper root prefix and key path (IDs are key paths like \"root.a.b\").","If the object was deleted, guard for its absence instead of assuming it exists."],"exampleFix":"// before\nids, err := d2oracle.GetChildrenIDs(g, nil, \"servers.db1\")\n// after\nids, err := d2oracle.GetChildrenIDs(g, nil, \"root.servers.db1\") // include root prefix\n","handlingStrategy":"validation","validationCode":"if _, ok := g.Root.HasChild(d2graph.Key(mk.Key)); !ok {\n\treturn fmt.Errorf(\"object %s does not exist on board %v\", absID, boardPath)\n}\nids, err := d2oracle.GetChildrenIDs(g, boardPath, absID)","typeGuard":"func objExists(g *d2graph.Graph, boardPath []string, absID string) bool {\n\tbg := d2oracle.GetBoardGraph(g, boardPath)\n\tif bg == nil {\n\t\treturn false\n\t}\n\tmk, err := d2parser.ParseMapKey(absID)\n\tif err != nil {\n\t\treturn false\n\t}\n\t_, ok := bg.Root.HasChild(d2graph.Key(mk.Key))\n\treturn ok\n}","tryCatchPattern":"ids, err := d2oracle.GetChildrenIDs(g, boardPath, absID)\nif err != nil {\n\tif strings.Contains(err.Error(), \"not found\") && strings.Contains(err.Error(), absID) {\n\t\treturn fmt.Errorf(\"object %q is gone; refresh IDs from the current graph\", absID)\n\t}\n\treturn err\n}","preventionTips":["Use AbsID() values obtained from the graph, never labels or hand-built strings.","Re-fetch IDs after any edit, rename, or delete operation.","Verify the object belongs to the board you are querying.","Format IDs as root-prefixed key paths (root.a.b)."],"tags":["d2","object-id","invalid-input"],"backgroundTag":"resource-not-found","analyzedSha":"0d69dca6f532ceaeacd615d35d1eaa41a238ffdb","analyzedAt":"2026-08-31T12:19:21.182Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}