async handleMessage(command: ProtocolCommand, payload: Record<string, unknown>): Promise<void> {
let messageResponse: Record<string, unknown>;
- if (this.messageHandlers.has(command)) {
+ if (this.messageHandlers.has(command) && command !== ProtocolCommand.UNKNOWN) {
try {
// Call the method to build the response
messageResponse = await this.messageHandlers.get(command)(payload);
} catch (error) {
// Log
- logger.error(this.webSocketServer.logPrefix() + ' Handle request error: %j', error);
+ logger.error(this.webSocketServer.logPrefix() + ' Handle message error: %j', error);
throw error;
}
} else {