From dfcd7b65426fb3bc5002c6328cd9b7d3c1327317 Mon Sep 17 00:00:00 2001 From: nzhu Date: Thu, 29 Jan 2026 10:56:41 +0800 Subject: [PATCH] gateway: format webchat authz error --- src/gateway/server-methods.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gateway/server-methods.ts b/src/gateway/server-methods.ts index ea92d4e72..fc763bac2 100644 --- a/src/gateway/server-methods.ts +++ b/src/gateway/server-methods.ts @@ -114,7 +114,10 @@ function authorizeGatewayMethod(method: string, client: GatewayRequestOptions["c if (role === "webchat") { if (WEBCHAT_ROLE_METHODS.has(method)) return null; - return errorShape(ErrorCodes.INVALID_REQUEST, `unauthorized method for role webchat: ${method}`); + return errorShape( + ErrorCodes.INVALID_REQUEST, + `unauthorized method for role webchat: ${method}`, + ); } if (role !== "operator") {