From 4a0bdfed92e22014334683db76971281618c6fa6 Mon Sep 17 00:00:00 2001 From: Psychotoxical <171614930+Psychotoxical@users.noreply.github.com> Date: Sun, 26 Apr 2026 00:42:44 +0200 Subject: [PATCH] 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) --- src/api/subsonic.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/api/subsonic.ts b/src/api/subsonic.ts index fef0f0f1..43a6366d 100644 --- a/src/api/subsonic.ts +++ b/src/api/subsonic.ts @@ -309,7 +309,8 @@ export async function pingWithCredentials( serverVersion: typeof data?.serverVersion === 'string' ? data.serverVersion : undefined, openSubsonic: data?.openSubsonic === true, }; - } catch { + } catch (err) { + console.warn('[psysonic] pingWithCredentials failed:', serverUrl, err); return { ok: false }; } }