{"record":{"id":"c3b18ddbde8f0989","repo":"nikivdev/code","slug":"found-pr-url-in-queue-entry-but-could-not-resolve","errorCode":null,"errorMessage":"found PR url in queue entry but could not resolve PR number","messagePattern":"found PR url in queue entry but could not resolve PR number","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/commit.rs","lineNumber":11781,"sourceCode":"    let head = default_pr_head(&entry);\n    let (number, url) = if let Some(url) = entry\n        .pr_url\n        .as_deref()\n        .map(|s| s.trim())\n        .filter(|s| !s.is_empty())\n        .map(|s| s.to_string())\n    {\n        let n = entry\n            .pr_number\n            .or_else(|| pr_number_from_url(&url))\n            .unwrap_or(0);\n        if n > 0 {\n            (n, url)\n        } else if let Some((n, u)) = gh_find_open_pr_by_head(repo_root, &repo, &head)? {\n            (n, u)\n        } else {\n            // If URL exists but we can't parse number or find by head, re-create is risky; just fail.\n            bail!(\"found PR url in queue entry but could not resolve PR number\");\n        }\n    } else if let Some((n, u)) = gh_find_open_pr_by_head(repo_root, &repo, &head)? {\n        (n, u)\n    } else {\n        // Create it if missing (as draft).\n        let gh_head = ensure_pr_head_pushed(repo_root, &head, &entry.commit_sha)?;\n        let (title, body_rest) = commit_message_title_body(&entry.message);\n        let (n, u) = if let Some(found) = gh_find_open_pr_by_head(repo_root, &repo, &gh_head)? {\n            found\n        } else {\n            gh_create_pr(\n                repo_root,\n                &repo,\n                &gh_head,\n                &opts.base,\n                &title,\n                body_rest.trim(),\n                true,","sourceCodeStart":11763,"sourceCodeEnd":11799,"githubUrl":"https://github.com/nikivdev/code/blob/a747e741ae92c09071d0ae946ab48488adcff1ce/src/commit.rs#L11763-L11799","documentation":"Error \"found PR url in queue entry but could not resolve PR number\" thrown in nikivdev/code.","triggerScenarios":"Thrown at src/commit.rs:11781 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a747e741ae92c09071d0ae946ab48488adcff1ce","analyzedAt":"2026-09-01T22:43:55.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}