mirror of
https://github.com/kilyabin/psysonic.git
synced 2026-07-21 22:15:40 +00:00
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:
+2
-1
@@ -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 };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user