{"record":{"id":"d74dfc6eb7f80fbe","repo":"OtterMind/Chat2DB","slug":"github-graphql-failed-json-stringify-payload-er","errorCode":null,"errorMessage":"GitHub GraphQL failed: ${JSON.stringify(payload.errors).slice(0, 1000)}","messagePattern":"GitHub GraphQL failed: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"script/github/sync-community-project.js","lineNumber":74,"sourceCode":"        'Content-Type': 'application/json',\n        'X-GitHub-Api-Version': '2022-11-28',\n      },\n      body: body === undefined ? undefined : JSON.stringify(body),\n    });\n    const payload = response.status === 204 ? null : await response.json();\n    if (!response.ok) {\n      throw new Error(`GitHub API ${method} ${endpoint} failed (${response.status}): ${JSON.stringify(payload).slice(0, 800)}`);\n    }\n    return payload;\n  }\n\n  async graphql(query, variables) {\n    const payload = await this.request('/graphql', {\n      method: 'POST',\n      body: { query, variables },\n    });\n    if (payload.errors?.length) {\n      throw new Error(`GitHub GraphQL failed: ${JSON.stringify(payload.errors).slice(0, 1000)}`);\n    }\n    return payload.data;\n  }\n\n  getIssue(number) {\n    return this.request(`/repos/${this.owner}/${this.repo}/issues/${number}`);\n  }\n\n  async getClosingIssues(pullRequestNumber) {\n    const data = await this.graphql(`\n      query ClosingIssues($owner: String!, $repo: String!, $number: Int!) {\n        repository(owner: $owner, name: $repo) {\n          pullRequest(number: $number) {\n            closingIssuesReferences(first: 50) {\n              nodes { id number state labels(first: 50) { nodes { name } } }\n            }\n          }\n        }","sourceCodeStart":56,"sourceCodeEnd":92,"githubUrl":"https://github.com/OtterMind/Chat2DB/blob/5ee1e990e73fbcae1969dc554be254fedb3ab888/script/github/sync-community-project.js#L56-L92","documentation":"Error \"GitHub GraphQL failed: ${JSON.stringify(payload.errors).slice(0, 1000)}\" thrown in OtterMind/Chat2DB.","triggerScenarios":"A GitHub GraphQL request returned an errors payload, typically due to a bad query, missing scope, or unknown node id.","commonSituations":"See trigger scenarios.","solutions":["Inspect the errors array in the message for the GraphQL field-level error and fix the query variables accordingly.","Confirm the token can access Projects V2 (GraphQL) and that the project number and owner are correct."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5ee1e990e73fbcae1969dc554be254fedb3ab888","analyzedAt":"2026-08-14T07:05:03.077Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}