diff --git a/services/channelQueue.js b/services/channelQueue.js index c6eefe1..19a60b6 100644 --- a/services/channelQueue.js +++ b/services/channelQueue.js @@ -25,10 +25,13 @@ async function executeRename(channel, entry) { // (403), or no token configured — fall back to the primary Discord.js client. // Non-fallback errors rethrow so enqueueRename's catch can classify/log. if (err && err.fallback === true && channel && typeof channel.setName === 'function') { - logWarn( - 'renameQueue', - `secondary-bot ${err.status ?? 'unavailable'}; falling back to primary channel=${channel.id}` - ).catch(() => {}); + // Local log only; discord.js's REST client transparently handles 429s + // on the primary fallback, so this used to post a paired warning to + // the debug channel for every secondary-bot quota event with no + // operator action required. Keep the visibility in container logs. + console.warn( + `[renameQueue] secondary-bot ${err.status ?? 'unavailable'}; falling back to primary channel=${channel.id}` + ); await channel.setName(currentName); } else { throw err; diff --git a/utils/renamer.js b/utils/renamer.js index 006cacc..55fd226 100644 --- a/utils/renamer.js +++ b/utils/renamer.js @@ -41,7 +41,10 @@ async function renameChannel(channelId, newName) { if (res.status === 429) { const retryAfterSec = (body && typeof body === 'object' && body.retry_after) || null; const retryAfterMs = retryAfterSec != null ? Math.ceil(Number(retryAfterSec) * 1000) : null; - logWarn('renamer', `429 rename channel=${channelId} retry_after=${retryAfterSec}`).catch(() => {}); + // Local log only; the channelQueue fallback path handles recovery + // transparently via discord.js's built-in 429 retry. Posting these to + // the debug channel was non-actionable noise. + console.warn(`[renamer] 429 rename channel=${channelId} retry_after=${retryAfterSec}`); // Respect retry_after up to 2000ms; otherwise fail over immediately. if (retryAfterMs != null && retryAfterMs > 0 && retryAfterMs <= 2000) {