From 0e5552bd2c0410199a5e324aef2c54a1f49f34d1 Mon Sep 17 00:00:00 2001 From: Josh Lehman Date: Tue, 17 Mar 2026 06:48:51 -0700 Subject: [PATCH] tests: satisfy gateway plugin error shape --- src/gateway/server-plugins.test.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gateway/server-plugins.test.ts b/src/gateway/server-plugins.test.ts index 39523ae1102..7887d43f24f 100644 --- a/src/gateway/server-plugins.test.ts +++ b/src/gateway/server-plugins.test.ts @@ -379,7 +379,10 @@ describe("loadGatewayPlugins", () => { const scopes = Array.isArray(opts.client?.connect?.scopes) ? opts.client.connect.scopes : []; const auth = authorizeOperatorScopesForMethod("sessions.get", scopes); if (!auth.allowed) { - opts.respond(false, undefined, { message: `missing scope: ${auth.missingScope}` }); + opts.respond(false, undefined, { + code: "INVALID_REQUEST", + message: `missing scope: ${auth.missingScope}`, + }); return; } opts.respond(true, { messages: [{ id: "m-1" }] });