fix: Invalid token to websocket server should not log an error
This commit is contained in:
@@ -117,7 +117,9 @@ export default function init(
|
|||||||
socket.emit("authenticated", true);
|
socket.emit("authenticated", true);
|
||||||
void authenticated(io, socket);
|
void authenticated(io, socket);
|
||||||
} catch (err) {
|
} 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.emit("unauthorized", { message: err.message }, function () {
|
||||||
socket.disconnect();
|
socket.disconnect();
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user