mirror of https://github.com/openclaw/openclaw.git
tests: satisfy gateway plugin error shape
This commit is contained in:
parent
ad52e6bc08
commit
0e5552bd2c
|
|
@ -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" }] });
|
||||
|
|
|
|||
Loading…
Reference in New Issue