{"record":{"id":"d85c8124ca899279","repo":"gastownhall/beads","slug":"failed-to-fetch-ado-d-for-link-sync-v","errorCode":null,"errorMessage":"Failed to fetch ADO #%d for link sync: %v","messagePattern":"Failed to fetch ADO #(.+?) for link sync: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"cmd/bd/ado.go","lineNumber":847,"sourceCode":"\t\t\t\tcontinue\n\t\t\t}\n\t\t\tdesired = append(desired, tracker.DependencyInfo{\n\t\t\t\tFromExternalID: extIDStr,\n\t\t\t\tToExternalID:   targetExtID,\n\t\t\t\tType:           string(dep.DependencyType),\n\t\t\t})\n\t\t}\n\n\t\tif len(desired) == 0 {\n\t\t\tcontinue\n\t\t}\n\n\t\t// Fetch current ADO work item to get existing relations.\n\t\tadoClient := at.ADOClient()\n\t\titems, ferr := adoClient.FetchWorkItems(ctx, []int{workItemID})\n\t\tif ferr != nil || len(items) == 0 {\n\t\t\tif warn != nil {\n\t\t\t\twarn(fmt.Sprintf(\"Failed to fetch ADO #%d for link sync: %v\", workItemID, ferr))\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\n\t\terrs := resolver.PushLinks(ctx, workItemID, items[0].Relations, desired, managedTargets)\n\t\tfor _, e := range errs {\n\t\t\tmsg := fmt.Sprintf(\"Link sync ADO #%d: %v\", workItemID, e)\n\t\t\twarnings = append(warnings, msg)\n\t\t\tif warn != nil {\n\t\t\t\twarn(msg)\n\t\t\t}\n\t\t}\n\t\tlinkCount += len(desired) - len(errs)\n\t}\n\n\treturn linkCount, warnings\n}\n","sourceCodeStart":829,"sourceCodeEnd":865,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/cmd/bd/ado.go#L829-L865","documentation":"This warning (not a returned error) is emitted by pushADOLinks during `bd ado` sync when FetchWorkItems fails or returns no items for a work item that has links to sync. The link sync for that item is skipped (continue) and the failure is surfaced via the warn callback so the rest of the sync proceeds.","triggerScenarios":"ADO API outage/auth failure during FetchWorkItems; the work item was deleted in Azure DevOps after beads cached its ID; a network timeout or rate limit mid-sync; items returned empty for an ID that no longer exists.","commonSituations":"Expired or rotated PAT credentials; deleted ADO work items still linked in beads; corporate proxy/firewall blocking dev.azure.com; transient ADO service throttling during large syncs.","solutions":["Read the underlying %v detail (auth error, 404, timeout) and fix that root cause.","Verify the ADO PAT/token is valid and has work-item read scope.","Check the work item still exists in ADO; if deleted, clean up the stale link in beads and re-sync.","Re-run `bd ado sync` after connectivity is restored to retry the skipped item."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"if len(warnings) > 0 {\n\tfor _, w := range warnings {\n\t\tif strings.Contains(w, \"Failed to fetch ADO\") {\n\t\t\t// retry sync after checking token/connectivity\n\t\t}\n\t}\n}","preventionTips":["Verify the ADO PAT before large syncs.","Monitor warn output and re-run sync to pick up skipped items.","Prune beads links to work items deleted in ADO."],"tags":["azure-devops","network","sync","warning"],"backgroundTag":"remote-fetch-failed","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}