affaan-m/ECC · error
announcement delivered; pending receipt cleanup requires att
Error message
announcement delivered; pending receipt cleanup requires attention
What it means
Discord release-announce report: the webhook POST succeeded, so the announcement was delivered, but a pre-existing 'pending' receipt marker could not be safely cleared and needs a human to inspect Discord. Delivery worked; only receipt bookkeeping requires attention.
Source
Thrown at scripts/discord/release-announce.mjs:177
throw new Error('announcement has a pending receipt; inspect Discord before clearing it');
}
const claimId = await addReceiptComment(discussion.id, `${marker}\n\nDiscord delivery: pending.`);
const payload = buildDiscordPayload({ title: discussion.title, body: discussion.body, url: discussion.url, key });
delete payload.nonce;
delete payload.enforce_nonce;
const response = await request(webhookUrl, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(payload),
});
if (!response.ok) {
await deleteReceiptComment(claimId);
throw new Error(`Discord webhook request failed (${response.status})`);
}
const message = await response.json();
await addReceiptComment(discussion.id, `${marker}\n\nDiscord delivery: complete (message ${message.id}).`);
await deleteReceiptComment(claimId).catch(() => {
console.warn('announcement delivered; pending receipt cleanup requires attention');
});
console.log('announcement delivered by channel webhook');
return;
}
if (!env.DISCORD_BOT_TOKEN || !/^\d{10,25}$/.test(env.DISCORD_ANNOUNCE_CHANNEL_ID || '')) {
throw new Error('Discord announcement credentials are missing or invalid');
}
const recent = await discord('GET', `/channels/${env.DISCORD_ANNOUNCE_CHANNEL_ID}/messages?limit=100`);
const receipt = findDiscordReceipt(recent, key);
if (receipt) {
await discord('PUT', `/channels/${env.DISCORD_ANNOUNCE_CHANNEL_ID}/pins/${receipt.id}`);
console.log('announcement already delivered; pin verified');
return;
}
const message = await discord('POST', `/channels/${env.DISCORD_ANNOUNCE_CHANNEL_ID}/messages`, buildDiscordPayload({
title: discussion.title,
body: discussion.body,
url: discussion.url,View on GitHub (pinned to 06c5e118c4)
Solutions
- Manually clean up the pending receipts in the state file.
- Re-run the announcement script's cleanup step after fixing the underlying error.
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at scripts/discord/release-announce.mjs:177 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of affaan-m/ECC@06c5e118c4 (2026-08-18).
Data as JSON: /api/errors/2e10f3d2ba23847e.
Report an issue: GitHub.