fix: Invalid token to websocket server should not log an error

This commit is contained in:
Tom Moor committed 2023-11-28 20:08:13 -05:00
1 parent fdd774fca7
commit ed175c84ff
1 file changed
+3 -1
+3 -1
View File
@@ -117,7 +117,9 @@ export default function init(
socket.emit("authenticated", true);
void authenticated(io, socket);
} catch (err) {
Logger.error(`Authentication error socket ${socket.id}`, err);
Logger.debug("websockets", `Authentication error socket ${socket.id}`, {
error: err.message,
});
socket.emit("unauthorized", { message: err.message }, function () {
socket.disconnect();
});