fix(github): name both causes of an installation lookup 404

GET /repos/{owner}/{repo}/installation returns 404 both when the App is
not installed for the owner and when the installation's repository
selection excludes the repository. The single-repository mint path
reported only the first cause, which misleads users whose App is
installed but not scoped to the repository. Name both causes and the
repository in the error.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Bryan Helmkamp 2026-08-24 17:49:49 -04:00
parent 79168d3a27
commit bc7635dbd1
No known key found for this signature in database

View file

@ -617,8 +617,8 @@ async fn mint_installation_token_with_jwt(
str::to_string,
);
bail!(
"GitHub App is not installed for {owner}. \
Install it at {install_url}"
"GitHub App is not installed for {owner}, or its installation does not \
include {owner}/{primary_repo}. Check repository access at {install_url}"
);
}
InstallationLookup::Failed(403) => {