{"record":{"id":"d5b4ede2993ddbaa","repo":"cli/cli","slug":"resolving-remove-blocking-reference-q-w","errorCode":null,"errorMessage":"resolving --remove-blocking reference %q: %w","messagePattern":"resolving --remove-blocking reference %q: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/cmd/issue/edit/edit.go","lineNumber":536,"sourceCode":"\tfor _, ref := range editOpts.RemoveBlockedBy {\n\t\tid, err := issueShared.ResolveIssueRef(client, baseRepo, ref)\n\t\tif err != nil {\n\t\t\treturn api.DeferredUpdateIssueOptions{}, fmt.Errorf(\"resolving --remove-blocked-by reference %q: %w\", ref, err)\n\t\t}\n\t\tupdateOpts.RemoveBlockedByIDs = append(updateOpts.RemoveBlockedByIDs, id)\n\t}\n\n\tfor _, ref := range editOpts.AddBlocking {\n\t\tid, err := issueShared.ResolveIssueRef(client, baseRepo, ref)\n\t\tif err != nil {\n\t\t\treturn api.DeferredUpdateIssueOptions{}, fmt.Errorf(\"resolving --add-blocking reference %q: %w\", ref, err)\n\t\t}\n\t\tupdateOpts.AddBlockingIDs = append(updateOpts.AddBlockingIDs, id)\n\t}\n\tfor _, ref := range editOpts.RemoveBlocking {\n\t\tid, err := issueShared.ResolveIssueRef(client, baseRepo, ref)\n\t\tif err != nil {\n\t\t\treturn api.DeferredUpdateIssueOptions{}, fmt.Errorf(\"resolving --remove-blocking reference %q: %w\", ref, err)\n\t\t}\n\t\tupdateOpts.RemoveBlockingIDs = append(updateOpts.RemoveBlockingIDs, id)\n\t}\n\n\treturn updateOpts, nil\n}\n","sourceCodeStart":518,"sourceCodeEnd":543,"githubUrl":"https://github.com/cli/cli/blob/0eeec0b92edbe70199f9768522f831d3534f41ad/pkg/cmd/issue/edit/edit.go#L518-L543","documentation":"Thrown by gh issue edit when a --remove-blocking reference cannot be resolved to a node ID via ResolveIssueRef. It is the last of the relationship-resolution loops in deferredUpdateIssueOptions; any unresolvable reference fails the whole edit before any API mutation is sent.","triggerScenarios":"Running 'gh issue edit N --remove-blocking <ref>' where the ref is malformed, deleted, on another host, or not readable by the token.","commonSituations":"Cleanup scripts removing dependency edges for deleted issues; stale inventories; formatting mistakes in batch commands.","solutions":["Pass the valid issue number or same-host URL that this issue currently blocks","List current blocking issues via gh issue view N --json blocking and reuse those numbers","Skip the flag if the target issue no longer exists"],"exampleFix":"# before\ngh issue edit 3 --remove-blocking \"#old\"\n# after\ngh issue edit 3 --remove-blocking 20","handlingStrategy":"validation","validationCode":"gh issue view <N> -R <owner>/<repo> --json blocking --jq '.blocking[].number'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use the issue's current blocking list as the source for removal numbers","Ignore refs whose issues no longer exist","Prefer numbers over URLs in batch cleanup"],"tags":["gh-cli","issue-edit","blocking","reference-resolution"],"backgroundTag":null,"analyzedSha":"0eeec0b92edbe70199f9768522f831d3534f41ad","analyzedAt":"2026-08-15T12:31:05.478Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}