OtterMind/Chat2DB · error · Error
GitHub API ${method} ${endpoint} failed (${response.status})
Error message
GitHub API ${method} ${endpoint} failed (${response.status}): ${JSON.stringify(payload).slice(0, 800)} What it means
Error "GitHub API ${method} ${endpoint} failed (${response.status}): ${JSON.stringify(payload).slice(0, 800)}" thrown in OtterMind/Chat2DB.
Source
Thrown at script/github/sync-community-project.js:63
this.owner = owner;
this.repo = repo;
this.apiUrl = apiUrl.replace(/\/$/, '');
}
async request(endpoint, { method = 'GET', body } = {}) {
const response = await fetch(`${this.apiUrl}${endpoint}`, {
method,
headers: {
Accept: 'application/vnd.github+json',
Authorization: `Bearer ${this.token}`,
'Content-Type': 'application/json',
'X-GitHub-Api-Version': '2022-11-28',
},
body: body === undefined ? undefined : JSON.stringify(body),
});
const payload = response.status === 204 ? null : await response.json();
if (!response.ok) {
throw new Error(`GitHub API ${method} ${endpoint} failed (${response.status}): ${JSON.stringify(payload).slice(0, 800)}`);
}
return payload;
}
async graphql(query, variables) {
const payload = await this.request('/graphql', {
method: 'POST',
body: { query, variables },
});
if (payload.errors?.length) {
throw new Error(`GitHub GraphQL failed: ${JSON.stringify(payload.errors).slice(0, 1000)}`);
}
return payload.data;
}
getIssue(number) {
return this.request(`/repos/${this.owner}/${this.repo}/issues/${number}`);
}View on GitHub (pinned to 5ee1e990e7)
Solutions
- Check the HTTP status and payload in the message: 401/403 mean token or permission problems, 404 means a wrong owner/repo/project number, 422 means an invalid request body.
- Verify the token has the required scopes (repo, project) and retry with corrected endpoint parameters.
When it happens
Trigger: A REST call to the GitHub API returned a non-2xx status while syncing the community project board.
Common situations: See trigger scenarios.
AI-assisted analysis of OtterMind/Chat2DB@5ee1e990e7 (2026-08-14).
Data as JSON: /api/errors/3e440e16fc7ca7c5.
Report an issue: GitHub.