chore(subsonic): log pingWithCredentials failures to console

Server-switch silently returns { ok: false } when the upstream ping
throws, so the user never sees why the switch refused. Surfacing the
underlying error (timeout, network, CORS, 401) gives us something to
work with the next time the issue reproduces.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Psychotoxical
2026-04-26 00:42:44 +02:00
parent a41628bdf9
commit 4a0bdfed92
+2 -1
View File
@@ -309,7 +309,8 @@ export async function pingWithCredentials(
serverVersion: typeof data?.serverVersion === 'string' ? data.serverVersion : undefined, serverVersion: typeof data?.serverVersion === 'string' ? data.serverVersion : undefined,
openSubsonic: data?.openSubsonic === true, openSubsonic: data?.openSubsonic === true,
}; };
} catch { } catch (err) {
console.warn('[psysonic] pingWithCredentials failed:', serverUrl, err);
return { ok: false }; return { ok: false };
} }
} }