gateway: format webchat authz error

This commit is contained in:
nzhu 2026-01-29 10:56:41 +08:00
parent 5fa7d31d87
commit dfcd7b6542

View File

@ -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") {