{"record":{"id":"a5ba6c36b0b892d5","repo":"JuliusBrussee/caveman","slug":"githubapp-get-repo-s-s-http-d-s","errorCode":null,"errorMessage":"githubapp: get repo %s/%s: HTTP %d: %s","messagePattern":"githubapp: get repo (.+?)/(.+?): HTTP (.+?): (.+?)","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"shared/platform/githubapp/githubapp.go","lineNumber":261,"sourceCode":"// Repo is the minimal repo metadata the connect flow stores.\ntype Repo struct {\n\tID            int64  `json:\"id\"`\n\tNodeID        string `json:\"node_id\"`\n\tFullName      string `json:\"full_name\"`\n\tDefaultBranch string `json:\"default_branch\"`\n}\n\n// GetRepo verifies that the installation token can see owner/name and returns the\n// repo's stable node id + default branch. Used by select-repo to confirm the repo\n// truly belongs to the installation before the binding goes 'active'.\nfunc (a *App) GetRepo(ctx context.Context, token, owner, name string) (Repo, error) {\n\tstatus, raw, err := a.do(ctx, \"Bearer \"+token, http.MethodGet,\n\t\t\"/repos/\"+url.PathEscape(owner)+\"/\"+url.PathEscape(name), nil)\n\tif err != nil {\n\t\treturn Repo{}, err\n\t}\n\tif status != http.StatusOK {\n\t\treturn Repo{}, fmt.Errorf(\"githubapp: get repo %s/%s: HTTP %d: %s\", owner, name, status, snippet(raw))\n\t}\n\tvar r Repo\n\tif err := json.Unmarshal(raw, &r); err != nil {\n\t\treturn Repo{}, fmt.Errorf(\"githubapp: decode repo: %w\", err)\n\t}\n\treturn r, nil\n}\n\n// GetRepoInstallation asks GitHub which installation of this App owns access to\n// a repository. This avoids treating public repository visibility as proof that\n// a caller-supplied installation id is authorized for that repository.\nfunc (a *App) GetRepoInstallation(ctx context.Context, owner, name string) (Installation, error) {\n\tvar out Installation\n\tjwt, err := a.AppJWT()\n\tif err != nil {\n\t\treturn out, err\n\t}\n\tstatus, raw, err := a.do(ctx, \"Bearer \"+jwt, http.MethodGet,","sourceCodeStart":243,"sourceCodeEnd":279,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/766dce6b1394ebb56a3090748d5a0240a5aefb36/shared/platform/githubapp/githubapp.go#L243-L279","documentation":"Fires in GetRepo() when GET /repos/{owner}/{name} with the installation token returns non-200 — the installation cannot see the repo (not installed on it, private, or wrong owner/name). Used by select-repo to prove the repo belongs to the installation before activation.","triggerScenarios":"Thrown at shared/platform/githubapp/githubapp.go:261 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Confirm the installation has access to that exact owner/name (404 means no access)","Correct the owner/name spelling and retry on transient 5xx"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"766dce6b1394ebb56a3090748d5a0240a5aefb36","analyzedAt":"2026-08-18T03:14:35.516Z","contentChangedAt":"2026-08-18T03:14:35.516Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}