Skip to content

Commit 7f0e58c

Browse files
committed
Add error message when instance cannot authenticate
1 parent a959847 commit 7f0e58c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

core/api/socket/socket.controller.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ module.exports = function SocketController(logger, socketModel, io, instanceMode
8686
socket.emit('user-authenticated');
8787
} else {
8888
socket.emit('user-authentication-failed', { reason });
89+
logger.warn(`User ${socket.id} authentication failed, reason = ${reason}`);
8990
socket.disconnect();
9091
}
9192
}
@@ -100,6 +101,7 @@ module.exports = function SocketController(logger, socketModel, io, instanceMode
100101
socket.emit('instance-authenticated');
101102
} else {
102103
socket.emit('instance-authentication-failed', { reason });
104+
logger.warn(`Instance ${socket.id} authentication failed, reason = ${reason}`);
103105
socket.disconnect();
104106
}
105107
}

0 commit comments

Comments
 (0)