different-ai/openwork · error · Error
Failed to load GitHub integrations (${accountsResult.respons
Error message
Failed to load GitHub integrations (${accountsResult.response.status}). What it means
fetchGithubConnections calls GET /v1/connector-accounts?connectorType=github&status=active&limit=100 and throws this error when the response is not ok. The thrown message includes the HTTP status; getErrorMessage substitutes a server-provided message when the payload carries one. It is the accounts half of a parallel load (the instances error is separate).
Source
Thrown at ee/apps/den-web/app/(den)/dashboard/_components/integration-data.tsx:277
}
function toRepoName(fullName: string) {
const parts = fullName.split("/");
return parts[parts.length - 1] ?? fullName;
}
async function simulateLatency(ms = 450) {
return new Promise<void>((resolve) => setTimeout(resolve, ms));
}
async function fetchGithubConnections() {
const [accountsResult, instancesResult] = await Promise.all([
requestJson("/v1/connector-accounts?connectorType=github&status=active&limit=100", { method: "GET" }, 15000),
requestJson("/v1/connector-instances?connectorType=github&status=active&limit=100", { method: "GET" }, 15000),
]);
if (!accountsResult.response.ok) {
throw new Error(getErrorMessage(accountsResult.payload, `Failed to load GitHub integrations (${accountsResult.response.status}).`));
}
if (!instancesResult.response.ok) {
throw new Error(getErrorMessage(instancesResult.payload, `Failed to load GitHub connector instances (${instancesResult.response.status}).`));
}
const accounts = parseGithubConnectorAccounts(accountsResult.payload);
const instances = parseGithubConnectorInstances(instancesResult.payload);
return accounts.map<ConnectedIntegration>((account) => ({
id: account.id,
provider: "github",
account: {
avatarInitial: toAvatarInitial(account.displayName),
createdByName: account.createdByName,
id: account.id,
installationId: account.remoteId ? Number(account.remoteId) : undefined,
kind: toAccountKind(account.metadata),
manageUrl: typeof account.metadata?.settingsUrl === "string" ? account.metadata.settingsUrl : null,View on GitHub (pinned to 2b7df46e8a)
Solutions
- Check response.status in the message: 401/403 → re-authenticate or verify org permissions; 404 → ensure the connector service is deployed; 429 → retry later; 5xx → check server logs.
- Refresh the session/sign in again if status is 401.
- Confirm the GitHub connector app is configured on the server (client ID/secret, webhook).
- Verify network/proxy connectivity to the Den API.
Example fix
// before
if (!accountsResult.response.ok) {
throw new Error(getErrorMessage(accountsResult.payload, `Failed to load GitHub integrations (${accountsResult.response.status}).`));
}
// after
if (!accountsResult.response.ok) {
if (accountsResult.response.status === 401) { await reauthenticate(); return fetchGithubConnections(); }
throw new Error(getErrorMessage(accountsResult.payload, `Failed to load GitHub integrations (${accountsResult.response.status}).`));
} Defensive patterns
Strategy: try-catch
Validate before calling
const res = await fetch("/v1/connector-accounts?connectorType=github&status=active&limit=100", { credentials: "include" });
if (!res.ok) console.warn("connector-accounts not loadable:", res.status); Type guard
null
Try / catch
try {
const integrations = await githubConnections();
} catch (e) {
const msg = e instanceof Error ? e.message : String(e);
if (/\(401\)/.test(msg)) showReauthPrompt();
else if (/\(404\)/.test(msg)) showConnectorNotDeployedNotice();
else setError(msg);
} Prevention
- Refresh the session before long-running dashboard sessions.
- Gate the integrations screen on connector service availability.
- Handle 429 with backoff for connector listing endpoints.
- Monitor 5xx rates on /v1/connector-accounts in server metrics.
When it happens
Trigger: GET /v1/connector-accounts returns 401/403 (expired session or lacking org role), 404 (connector service not installed on the deployment), 429 (rate limit), or 5xx from the connector backend.
Common situations: Session expired after idle; non-admin viewing integrations in an org that restricts connector access; self-hosted deployment without the connector accounts service; GitHub app credentials misconfigured server-side causing 5xx.
Understand the failure class
Background: 'Something went wrong' / 'Request failed (500)' / 'HTTP error! status: 404' — what failed HTTP requests actually mean and how to find the real cause — this error's family across 28 libraries.
Related errors
- Failed to load GitHub connector instances (${instancesResult
- Failed to fetch latest-mac.yml (${response.status} ${respons
- Managed MCP outbound request exceeded the guarded redirect l
- OIDC discovery failed with ${response.status}. Enter manual
- OpenWork workspace discovery failed (${response.status} ${re
AI-assisted analysis of different-ai/openwork@2b7df46e8a (2026-09-01).
Data as JSON: /api/errors/38377cf3fb3636e0.
Report an issue: GitHub.