{"record":{"id":"2566b4a56e8ba087","repo":"cli/cli","slug":"no-pull-requests-found","errorCode":null,"errorMessage":"no pull requests found","messagePattern":"no pull requests found","errorType":"exception","errorClass":"NotFoundError","httpStatus":null,"severity":"error","filePath":"pkg/cmd/pr/shared/finder.go","lineNumber":263,"sourceCode":"\t\t}\n\t}\n\n\tvar pr *api.PullRequest\n\tif f.prNumber > 0 {\n\t\tpr, err = findByNumber(httpClient, f.baseRefRepo, f.prNumber, fields.ToSlice())\n\t\tif err != nil {\n\t\t\treturn pr, f.baseRefRepo, err\n\t\t}\n\t} else if prRefs.BaseRepo() != nil && f.branchName != \"\" {\n\t\t// No PR number, but we have a base repo and branch name.\n\t\tpr, err = findForRefs(httpClient, prRefs, opts.States, fields.ToSlice())\n\t\tif err != nil {\n\t\t\treturn pr, f.baseRefRepo, err\n\t\t}\n\t} else {\n\t\t// If we don't have a PR number or a base repo and branch name,\n\t\t// we can't do anything\n\t\treturn nil, f.baseRefRepo, &NotFoundError{fmt.Errorf(\"no pull requests found\")}\n\t}\n\n\tg, _ := errgroup.WithContext(context.Background())\n\tif fields.Contains(\"reviews\") {\n\t\tg.Go(func() error {\n\t\t\treturn preloadPrReviews(httpClient, f.baseRefRepo, pr)\n\t\t})\n\t}\n\tif fields.Contains(\"comments\") {\n\t\tg.Go(func() error {\n\t\t\treturn preloadPrComments(httpClient, f.baseRefRepo, pr)\n\t\t})\n\t}\n\tif fields.Contains(\"closingIssuesReferences\") {\n\t\tg.Go(func() error {\n\t\t\treturn preloadPrClosingIssuesReferences(httpClient, f.baseRefRepo, pr)\n\t\t})\n\t}","sourceCodeStart":245,"sourceCodeEnd":281,"githubUrl":"https://github.com/cli/cli/blob/0eeec0b92edbe70199f9768522f831d3534f41ad/pkg/cmd/pr/shared/finder.go#L245-L281","documentation":"Error \"no pull requests found\" thrown in cli/cli.","triggerScenarios":"Thrown at pkg/cmd/pr/shared/finder.go:263 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Specify the pull request explicitly by number, URL, or branch."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0eeec0b92edbe70199f9768522f831d3534f41ad","analyzedAt":"2026-08-15T12:31:05.478Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}