affaan-m/ECC · error
release lookup failed (${response.status})
Error message
release lookup failed (${response.status}) What it means
Thrown by releaseFromGitHub when the GitHub API release lookup returns a non-OK HTTP status (e.g. 404 for a missing tag, 401 for a bad token). The announcement cannot be built without the release payload.
Source
Thrown at scripts/discord/release-announce.mjs:47
async function githubGraphql(query, variables) {
const response = await request('https://api.github.com/graphql', {
method: 'POST',
headers: { Authorization: `Bearer ${env.GITHUB_TOKEN}`, 'Content-Type': 'application/json' },
body: JSON.stringify({ query, variables }),
});
if (!response.ok) throw new Error(`GitHub GraphQL request failed (${response.status})`);
const payload = await response.json();
if (payload.errors) throw new Error('GitHub GraphQL returned errors');
return payload.data;
}
async function releaseFromGitHub() {
const [owner, repo] = env.GITHUB_REPOSITORY.split('/');
const tag = env.RELEASE_TAG || env.GITHUB_REF_NAME;
const response = await request(`https://api.github.com/repos/${owner}/${repo}/releases/tags/${encodeURIComponent(tag)}`, {
headers: { Authorization: `Bearer ${env.GITHUB_TOKEN}`, Accept: 'application/vnd.github+json' },
});
if (!response.ok) throw new Error(`release lookup failed (${response.status})`);
return response.json();
}
async function createOrFindReleaseDiscussion() {
const release = await releaseFromGitHub();
const [owner, name] = env.GITHUB_REPOSITORY.split('/');
const marker = releaseMarker(release.tag_name);
const data = await githubGraphql(
`query($owner:String!,$name:String!){repository(owner:$owner,name:$name){id discussionCategories(first:25){nodes{id name}}}}`,
{ owner, name },
);
const repository = data.repository;
let cursor = null;
let existing = null;
for (let page = 0; page < 50 && !existing; page += 1) {
const pageData = await githubGraphql(
`query($owner:String!,$name:String!,$after:String){repository(owner:$owner,name:$name){discussions(first:100,after:$after,orderBy:{field:CREATED_AT,direction:DESC}){nodes{id title body url category{name}} pageInfo{hasNextPage endCursor}}}}`,
{ owner, name, after: cursor },View on GitHub (pinned to 06c5e118c4)
Solutions
- Inspect the underlying error detail in the message (stderr/log/HTTP status), fix the cause, and retry.
Defensive patterns
Strategy: retry
When it happens
Trigger: Triggered when release-announce.mjs rejects the current invocation: release lookup failed (<value>)
Common situations: Occurs while running scripts/discord/release-announce.mjs with invalid arguments, missing flags, or a failing external dependency; the guard at scripts/discord/release-announce.mjs:47 aborts the command with this message.
AI-assisted analysis of affaan-m/ECC@06c5e118c4 (2026-08-18).
Data as JSON: /api/errors/9bad28b7370bcfa5.
Report an issue: GitHub.