diff --git a/src/api/client.ts b/src/api/client.ts index 8531db10..86fb1952 100644 --- a/src/api/client.ts +++ b/src/api/client.ts @@ -111,6 +111,9 @@ export class WsClient extends Emittery { */ static connect(url: string) { return new Promise((resolve, reject) => { + if (url.includes("localhost")) { + throw new Error('localhost is not supported in the url. Use "127.0.0.1" instead.'); + } const socket = new IsoWebSocket(url); // make sure that there are no uncaught connection // errors because that causes nodejs thread to crash