more verbose accelerator websocket error logs

This commit is contained in:
Mononaut 2024-11-21 21:54:19 +00:00
parent 9a81db8e6c
commit ffa582558b
No known key found for this signature in database
GPG Key ID: A3F058E41374C04E

View File

@ -257,7 +257,11 @@ class AccelerationApi {
}); });
this.ws.on('error', (error) => { this.ws.on('error', (error) => {
logger.err(`Acceleration websocket error on ${this.websocketPath}: ` + error); let errMsg = `Acceleration websocket error on ${this.websocketPath}: ${error['code']}`;
if (error['errors']) {
errMsg += ' - ' + error['errors'].join(' - ');
}
logger.err(errMsg);
this.ws = null; this.ws = null;
this.websocketConnected = false; this.websocketConnected = false;
}); });