JuliusBrussee/caveman · error
githubapp: get repository proof: HTTP %d: %s
Error message
githubapp: get repository proof: HTTP %d: %s
What it means
Fires in GetFileContent() when GET on the contents endpoint returns non-200 — the file does not exist at that ref, the installation token lacks access, or the repo/owner is wrong. Used for connection-proof retrieval (tiny text files).
Source
Thrown at shared/platform/githubapp/githubapp.go:316
// 64 KiB post-decode ceiling because connection proofs are tiny text files.
func (a *App) GetFileContent(ctx context.Context, token, owner, name, path, ref string) ([]byte, error) {
segments := strings.Split(strings.Trim(path, "/"), "/")
if len(segments) == 0 || segments[0] == "" {
return nil, fmt.Errorf("githubapp: content path is required")
}
for i := range segments {
segments[i] = url.PathEscape(segments[i])
}
endpoint := "/repos/" + url.PathEscape(owner) + "/" + url.PathEscape(name) + "/contents/" + strings.Join(segments, "/")
if strings.TrimSpace(ref) != "" {
endpoint += "?" + url.Values{"ref": {ref}}.Encode()
}
status, raw, err := a.do(ctx, "Bearer "+token, http.MethodGet, endpoint, nil)
if err != nil {
return nil, err
}
if status != http.StatusOK {
return nil, fmt.Errorf("githubapp: get repository proof: HTTP %d: %s", status, snippet(raw))
}
var payload struct {
Type string `json:"type"`
Encoding string `json:"encoding"`
Content string `json:"content"`
Size int64 `json:"size"`
}
if err := json.Unmarshal(raw, &payload); err != nil {
return nil, fmt.Errorf("githubapp: decode repository proof: %w", err)
}
if payload.Type != "file" || payload.Encoding != "base64" || payload.Size < 0 || payload.Size > 64<<10 {
return nil, fmt.Errorf("githubapp: repository proof has invalid type, encoding, or size")
}
decoded, err := base64.StdEncoding.DecodeString(strings.ReplaceAll(payload.Content, "\n", ""))
if err != nil {
return nil, fmt.Errorf("githubapp: decode repository proof content: %w", err)
}
if len(decoded) > 64<<10 || int64(len(decoded)) != payload.Size {View on GitHub (pinned to 766dce6b13)
Solutions
- Verify the proof file exists at the given path and ref (404 means missing)
- Check the installation token grants contents read access; retry on transient 5xx
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at shared/platform/githubapp/githubapp.go:316 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of JuliusBrussee/caveman@766dce6b13 (2026-08-18).
Data as JSON: /api/errors/8e298dd24975fa36.
Report an issue: GitHub.