mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-24 06:01:44 -05:00
fix(logging): update logger calls to use player logger for transport errors and API issues
This commit is contained in:
1 parent
aa56d98809
commit
8b99bd01dc
4 files changed
+20
-6
No files matched your search
@@ -574,6 +574,13 @@ const PlayerLifecycleMixin = {
|
||||
player.textChannel = null;
|
||||
logger.warn(`[PlayerManager] Cannot send player message in channel ${ch.id} — missing permissions`);
|
||||
} else {
|
||||
const status = err?.status ?? err?.statusCode;
|
||||
const is5xx = status >= 500 && status < 600;
|
||||
const isHtml = typeof err?.message === "string" && /<!doctype|<html/i.test(err.message);
|
||||
if (is5xx || isHtml) {
|
||||
logger.player(`[PlayerManager] Could not send player message in channel ${ch.id} (Fluxer API HTTP ${status || 503} unavailable)`);
|
||||
return;
|
||||
}
|
||||
logger.warn(`[PlayerManager] Failed to send player message in channel ${ch.id}:`, err?.message ?? err);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user