tests: satisfy gateway plugin error shape

This commit is contained in:
Josh Lehman 2026-03-17 06:48:51 -07:00
parent ad52e6bc08
commit 0e5552bd2c
No known key found for this signature in database
GPG Key ID: D141B425AC7F876B
1 changed files with 4 additions and 1 deletions

View File

@ -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" }] });