diff --git a/chat-app/frontend/websocket.js b/chat-app/frontend/websocket.js index b61372c..0c104ed 100644 --- a/chat-app/frontend/websocket.js +++ b/chat-app/frontend/websocket.js @@ -1,3 +1,8 @@ export function createWebSocket() { - return new WebSocket("ws://localhost:3000/chat-service"); + try { + return new WebSocket("ws://localhost:3000/chat-service"); + } catch (e) { + console.error(e); + throw e; + } }