tinyhumansai/openhuman · error
Failed to list branches
Error message
Failed to list branches
What it means
BranchPicker calls Composio's GITHUB_LIST_BRANCHES for the chosen owner/repo (per_page 100); a successful=false response with an empty error string falls back to this message. The GitHub connection is not re-verified here — the repo was already selected upstream.
Source
Thrown at app/src/components/skills/inputs/BranchPicker.tsx:72
setError(null);
return;
}
const [owner, repoName] = repo.split('/');
if (!owner || !repoName) {
setBranches([]);
return;
}
const seq = ++requestSeqRef.current;
setLoading(true);
setError(null);
try {
const res = await composioExecute('GITHUB_LIST_BRANCHES', {
owner,
repo: repoName,
per_page: 100,
});
if (seq !== requestSeqRef.current) return;
if (!res.successful) throw new Error(res.error ?? 'Failed to list branches');
// Composio wraps GitHub branch data in a few different shapes
// (details, data.details, branches, items, direct array under data) —
// probe the same way DevWorkflowPanel does.
const raw = res.data;
let list: GhBranch[] = [];
if (Array.isArray(raw)) {
list = raw as GhBranch[];
} else if (raw && typeof raw === 'object') {
const obj = raw as Record<string, unknown>;
const dataObj = obj.data as Record<string, unknown> | undefined;
const arr =
(obj.details as unknown[] | undefined) ??
(dataObj?.details as unknown[] | undefined) ??
(obj.branches as unknown[] | undefined) ??
(obj.items as unknown[] | undefined) ??
(dataObj as unknown[] | undefined);
if (Array.isArray(arr)) {
list = arr as GhBranch[];View on GitHub (pinned to a221052e0d)
Solutions
- Confirm the repo still exists and the connected account can see it, then retry
- Reconnect GitHub via Composio if the token lost repo scope
- Re-pick the repository (or retry later) if listing keeps failing
Defensive patterns
Strategy: try-catch
Validate before calling
// Guard the inputs before the Composio call:
if (!owner.trim() || !repoName.trim() || /\s/.test(`${owner}${repoName}`)) {
// block fetch: malformed owner/repo always fails the action
} Type guard
const isBranchListResult = (raw: unknown): boolean => Array.isArray(raw) || !!((raw as Record<string, unknown>)?.details);
Try / catch
try {
const res = await composioExecute('GITHUB_LIST_BRANCHES', { owner, repo, per_page: 100 });
if (!res.successful) { setError(res.error ?? 'Failed to list branches'); return; }
} catch (e) {
// network/Composio-level failure: offer retry and reconnect-GitHub hint
} Prevention
- Confirm the repo is still visible to the connected account before drilling into branches
- Reconnect GitHub via Composio when listings suddenly start failing after working before
- Respect per_page limits and debounce rapid repo switching (requestSeq pattern is already in place)
When it happens
Trigger: Composio action fails with res.error empty: token lost access to the repo, repo renamed/deleted/made private, GitHub rate limit.
Common situations: Repo transferred or privated after the connection was made; GitHub App scopes narrowed; bursts of branch listing hitting rate limits.
Related errors
- Failed to fetch repositories
- Failed to fetch repositories
- Not running in Tauri
- gh failed (${r.status}): ${r.stderr?.trim() || "unknown erro
- gh api failed (${list.status}): ${list.stderr?.trim() || "un
AI-assisted analysis of tinyhumansai/openhuman@a221052e0d (2026-08-16).
Data as JSON: /api/errors/4544b526f0e561bf.
Report an issue: GitHub.