From b72ca0b019d82386e9e361b5c6f8cab4b14d8d4e Mon Sep 17 00:00:00 2001 From: Sriniketh J Date: Sat, 20 Jan 2024 13:14:39 +0530 Subject: [PATCH 1/3] fix: error message on missing auth func --- src/adapters/ws/client.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/adapters/ws/client.ts b/src/adapters/ws/client.ts index 2c20f4abb..76520d7a4 100644 --- a/src/adapters/ws/client.ts +++ b/src/adapters/ws/client.ts @@ -2,7 +2,7 @@ import Adapter from '../../lib/adapter.js' import GleeMessage from '../../lib/message.js' import ws from 'ws' -import { clientAuthConfig } from '../../lib/userAuth.js' +import { authFunctions, clientAuthConfig } from '../../lib/userAuth.js' import GleeAuth from '../../lib/wsHttpAuth.js' import { applyAddressParameters } from '../../lib/util.js' import Debug from 'debug' @@ -75,7 +75,7 @@ class WsClientAdapter extends Adapter { }) client.on('error', (err: any) => { - const errMessage = `WebSocket client error on channel '${channel}'` + const errMessage = `Error: Authentication function not found in auth/${this.serverName}. Expected function 'clientAuth'` this.emit('error', new Error(errMessage)) console.error(err) }) From d5ab5a74fb2e55a68af51a51cafcde59e18e9196 Mon Sep 17 00:00:00 2001 From: Sriniketh J Date: Sat, 20 Jan 2024 13:22:37 +0530 Subject: [PATCH 2/3] reafctor: remove unnecessary imports --- src/adapters/ws/client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/adapters/ws/client.ts b/src/adapters/ws/client.ts index 76520d7a4..88bde7573 100644 --- a/src/adapters/ws/client.ts +++ b/src/adapters/ws/client.ts @@ -2,7 +2,7 @@ import Adapter from '../../lib/adapter.js' import GleeMessage from '../../lib/message.js' import ws from 'ws' -import { authFunctions, clientAuthConfig } from '../../lib/userAuth.js' +import { clientAuthConfig } from '../../lib/userAuth.js' import GleeAuth from '../../lib/wsHttpAuth.js' import { applyAddressParameters } from '../../lib/util.js' import Debug from 'debug' From 81e6d04243ca5242b0714248d42af049e1b1338f Mon Sep 17 00:00:00 2001 From: Sriniketh J <81156510+srini047@users.noreply.github.com> Date: Fri, 15 Mar 2024 21:35:59 +0530 Subject: [PATCH 3/3] Update client.ts --- src/adapters/ws/client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/adapters/ws/client.ts b/src/adapters/ws/client.ts index 88bde7573..62b3bcf95 100644 --- a/src/adapters/ws/client.ts +++ b/src/adapters/ws/client.ts @@ -75,7 +75,7 @@ class WsClientAdapter extends Adapter { }) client.on('error', (err: any) => { - const errMessage = `Error: Authentication function not found in auth/${this.serverName}. Expected function 'clientAuth'` + const errMessage = `Error: Authentication function not found at location auth/${this.serverName}. Expected function 'clientAuth'` this.emit('error', new Error(errMessage)) console.error(err) })