feat(ui): make evses works in the web ui
[e-mobility-charging-stations-simulator.git] / src / charging-station / ui-server / UIWebSocketServer.ts
index 291e92631bc2864dda4a77c18fd702cf2763263c..bf9eb8b3a66b753907d98a2df18120dcd25291ce 100644 (file)
@@ -10,7 +10,7 @@ import {
   type UIServerConfiguration,
   WebSocketCloseEventStatusCode,
 } from '../../types';
-import { Utils, logger } from '../../utils';
+import { Constants, Utils, logger } from '../../utils';
 import { AbstractUIServer, UIServerUtils } from '../internal';
 
 const moduleName = 'UIWebSocketServer';
@@ -48,12 +48,7 @@ export class UIWebSocketServer extends AbstractUIServer {
         }
         const [requestId] = request as ProtocolRequest;
         this.responseHandlers.set(requestId, ws);
-        this.uiServices
-          .get(version)
-          ?.requestHandler(request)
-          .catch(() => {
-            /* Error caught by AbstractUIService */
-          });
+        this.uiServices.get(version)?.requestHandler(request).catch(Constants.EMPTY_FUNCTION);
       });
       ws.on('error', (error) => {
         logger.error(`${this.logPrefix(moduleName, 'start.ws.onerror')} WebSocket error:`, error);