mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-24 06:01:44 -05:00
fix(player): downgrade search candidate failure logging and suppress benign telemetry
- Downgrade exploratory candidate query errors in SearchMixin._searchFreeText from logger.warn to logger.player - Safely extract error description when Lavalink search rejects with non-standard error shapes - Guard against null result.tracks in Player.search() - Add ErrorChannel suppression for benign player search candidate misses
This commit is contained in:
1 parent
5ac04535f3
commit
5e39679f45
2 files changed
+6
-2
No files matched your search
@@ -292,6 +292,8 @@ function _forward(level, tag, args) {
|
|||||||
if (tag.includes("[LastFm]") && (/not found|error 6:/i.test(body) || /Track not found/i.test(body))) return;
|
if (tag.includes("[LastFm]") && (/not found|error 6:/i.test(body) || /Track not found/i.test(body))) return;
|
||||||
/* Suppress transient socket drops from routine status channel updates */
|
/* Suppress transient socket drops from routine status channel updates */
|
||||||
if (tag.includes("[StatusChannel]") && (/other side closed/i.test(body) || /fetch failed/i.test(body))) return;
|
if (tag.includes("[StatusChannel]") && (/other side closed/i.test(body) || /fetch failed/i.test(body))) return;
|
||||||
|
/* Suppress benign search fallback and candidate exploration warnings */
|
||||||
|
if (tag.includes("[Player]") && (/Free text search candidate/i.test(tag) || /search candidate.*failed/i.test(tag))) return;
|
||||||
const now = Date.now();
|
const now = Date.now();
|
||||||
const key = `${level}|${tag}|${(body || tag).slice(0, 200)}`;
|
const key = `${level}|${tag}|${(body || tag).slice(0, 200)}`;
|
||||||
const last = _forwardDedup.get(key);
|
const last = _forwardDedup.get(key);
|
||||||
|
|||||||
@@ -382,7 +382,9 @@ const SearchMixin = {
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
logger.warn(`[Player] Free text search candidate "${candidate}" failed (${source}):`, err?.message);
|
/* Search candidate exploration is a normal fallback mechanism; log as player diagnostic */
|
||||||
|
const errMsg = err?.message || err?.error || (typeof err === "string" ? err : "") || "unknown error";
|
||||||
|
logger.player(`[Player] Free text search candidate "${candidate}" failed (${source}):`, errMsg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
@@ -650,7 +652,7 @@ const SearchMixin = {
|
|||||||
try {
|
try {
|
||||||
const source = this._getSource(provider);
|
const source = this._getSource(provider);
|
||||||
const result = await this._searchFreeText(query, source);
|
const result = await this._searchFreeText(query, source);
|
||||||
return result.tracks || [];
|
return result?.tracks || [];
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
logger.error(`[Player] lavalink search error:`, e?.message);
|
logger.error(`[Player] lavalink search error:`, e?.message);
|
||||||
return [];
|
return [];
|
||||||
|
|||||||
Reference in new issue
Block a user