Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(antigravity): distinguish session initialization auth failures #9919

Mergedmaria-rcksmerged 1 commit intomain fromrefs/pull/9919/headmerged by maria-rcks View on GitHub

Showing 2 changed files with 31 additions and 1 deletion.

x
0 of 2 viewed, 2 left
28 additions and 1 deletionapps/server/src/provider/AntigravityAuth.test.tsModified
View file
@@ -61,7 +61,7 @@
} = {},
) {
const authenticated = yield* Deferred.make<void, AcpErrors.AcpError>();
- const discovered = yield* Deferred.make<void>();
+ const discovered = yield* Deferred.make<void, AcpErrors.AcpError>();
const closed = yield* Deferred.make<void>();
const events: string[] = [];
let receiveAuthorizationUrl:
@@ -224,6 +224,33 @@
}),
​
+ it.effect(
+ "distinguishes a post-authentication session failure without exposing its payload",
+ () =>
+ Effect.gen(function* () {
+ const harness = yield* makeHarness();
+ yield* harness.auth.controller.start(owner);
+ yield* phase(harness.auth, "waiting");
+ yield* Deferred.succeed(harness.authenticated, undefined);
+ yield* Deferred.fail(
+ harness.discovered,
+ new AcpErrors.AcpRequestError({
+ code: -32603,
+ errorMessage: `Internal error ${callbackUrl}`,
+ method: "session/new",
+ }),
+ );