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
@@ -382,7 +382,9 @@ const SearchMixin = {
|
||||
return res;
|
||||
}
|
||||
} 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;
|
||||
@@ -650,7 +652,7 @@ const SearchMixin = {
|
||||
try {
|
||||
const source = this._getSource(provider);
|
||||
const result = await this._searchFreeText(query, source);
|
||||
return result.tracks || [];
|
||||
return result?.tracks || [];
|
||||
} catch (e) {
|
||||
logger.error(`[Player] lavalink search error:`, e?.message);
|
||||
return [];
|
||||
|
||||
Reference in new issue
Block a user