fixed log error in diagnostic

This commit is contained in:
duffyduck 2026-03-12 00:17:15 +01:00
parent eaa0c2bcbe
commit 537c5b06c1
1 changed files with 3 additions and 1 deletions

View File

@ -149,7 +149,9 @@ async function connectGateway() {
state.gateway.handshakeOk = true;
state.gateway.lastError = null;
} else {
const error = response.error || JSON.stringify(response).slice(0, 200);
const error = typeof response.error === "string"
? response.error
: JSON.stringify(response.error || response).slice(0, 300);
throw new Error(`Handshake fehlgeschlagen: ${error}`);
}