{"record":{"id":"aaff592b050fb6d7","repo":"cli/cli","slug":"resolving-remove-blocked-by-reference-q-w","errorCode":null,"errorMessage":"resolving --remove-blocked-by reference %q: %w","messagePattern":"resolving --remove-blocked-by reference %q: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/cmd/issue/edit/edit.go","lineNumber":521,"sourceCode":"\tfor _, ref := range editOpts.RemoveSubIssues {\n\t\tid, err := issueShared.ResolveIssueRef(client, baseRepo, ref)\n\t\tif err != nil {\n\t\t\treturn api.DeferredUpdateIssueOptions{}, fmt.Errorf(\"resolving --remove-sub-issue reference %q: %w\", ref, err)\n\t\t}\n\t\tupdateOpts.RemoveSubIssueIDs = append(updateOpts.RemoveSubIssueIDs, id)\n\t}\n\n\tfor _, ref := range editOpts.AddBlockedBy {\n\t\tid, err := issueShared.ResolveIssueRef(client, baseRepo, ref)\n\t\tif err != nil {\n\t\t\treturn api.DeferredUpdateIssueOptions{}, fmt.Errorf(\"resolving --add-blocked-by reference %q: %w\", ref, err)\n\t\t}\n\t\tupdateOpts.AddBlockedByIDs = append(updateOpts.AddBlockedByIDs, id)\n\t}\n\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}","sourceCodeStart":503,"sourceCodeEnd":539,"githubUrl":"https://github.com/cli/cli/blob/0eeec0b92edbe70199f9768522f831d3534f41ad/pkg/cmd/issue/edit/edit.go#L503-L539","documentation":"Thrown by gh issue edit when a --remove-blocked-by reference cannot be resolved to a node ID via ResolveIssueRef. As with other relationship flags, all references are resolved up front; one unresolvable value fails the entire update.","triggerScenarios":"Running 'gh issue edit N --remove-blocked-by <ref>' with a malformed, deleted, cross-host, or unreadable issue reference.","commonSituations":"Removing dependency links for issues that were deleted or moved; stale automation state; incorrect ref formatting in scripts.","solutions":["Pass the valid issue number or same-host URL currently blocking the issue","Inspect current relationships (gh issue view N --json blockedBy) and use those numbers","If the blocker was deleted, drop the flag; the edge is typically removed with the node"],"exampleFix":"# before\ngh issue edit 3 --remove-blocked-by old-blocker\n# after\ngh issue edit 3 --remove-blocked-by 99","handlingStrategy":"validation","validationCode":"gh issue view <N> -R <owner>/<repo> --json blockedBy --jq '.blockedBy[].number'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Read current blockedBy numbers before constructing removal commands","Tolerate already-deleted blockers in cleanup scripts by skipping them","Keep refs as plain numbers"],"tags":["gh-cli","issue-edit","blocked-by","reference-resolution"],"backgroundTag":null,"analyzedSha":"0eeec0b92edbe70199f9768522f831d3534f41ad","analyzedAt":"2026-08-15T12:31:05.478Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}