fix: preserve probe errors and complete refresh alerts

This commit is contained in:
Thomas Durieux committed 2026-10-09 06:17:40 +00:00
1 parent 2b20abe0a5
commit 9a2707d4b8
6 files changed
+102 -11

No files matched your search

+6 -2
View File
@@ -52,7 +52,9 @@ export async function classifyGitHubMissError(
repo: data.repoName,
});
return "commit_not_found";
} catch {
} catch (probeError) {
if ((probeError as { status?: number; httpStatus?: number }).status !== 404 &&
(probeError as { httpStatus?: number }).httpStatus !== 404) throw probeError;
// Repo no longer exists at owner/repo. Try to recover via the cached
// numeric GitHub id — if the repo was renamed, GET /repositories/{id}
// resolves to its new full_name. See #409.
@@ -87,7 +89,9 @@ export async function classifyGitHubMissError(
return "repo_renamed";
}
return "repo_not_found";
} catch {
} catch (probeError) {
if ((probeError as { status?: number; httpStatus?: number }).status !== 404 &&
(probeError as { httpStatus?: number }).httpStatus !== 404) throw probeError;
return "repo_not_found";
}
}