Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(relay): preserve provisioning failure stage in client errors #14581

MergedECuteri(GitHub profile, opens in a new tab)merged 5 commits intomain fromrefs/pull/14581/headmerged by juliusmarminge View on GitHub

Showing 6 changed files with 124 additions and 2 deletions (loading 3).

x
0 of 6 viewed, 6 left
101 additions and 0 deletionsinfra/relay/src/http/Api.test.tsModified
View file
@@ -26,6 +26,7 @@
import * as Option from "effect/Option";
import * as Predicate from "effect/Predicate";
import * as Redacted from "effect/Redacted";
+import * as Schema from "effect/Schema";
import * as TestClock from "effect/testing/TestClock";
import * as Tracer from "effect/Tracer";
import * as Etag from "effect/http/Etag";
@@ -41,7 +42,10 @@
RelayEnvironmentAuth,
RelayEnvironmentPrincipal,
RelayApi,
+ RelayEnvironmentLinkUnavailableError,
+ RelayEnvironmentLinkRequest,
} from "@t3tools/contracts/relay";
+import { relayProtectedErrorMessage } from "@t3tools/client-runtime/relay";
import { RELAY_MANAGED_TUNNEL_RECOVERY_TYP, signRelayJwt } from "@t3tools/shared/relayJwt";
​
import {
@@ -93,6 +97,103 @@
managedEndpointNamespace: undefined,
};
​
+const encodeLinkRequest = Schema.encodeEffect(Schema.fromJsonString(RelayEnvironmentLinkRequest));
+const decodeLinkUnavailableError = Schema.decodeUnknownEffect(RelayEnvironmentLinkUnavailableError);
+​
+describe("managed endpoint provisioning errors", () => {
+ it.effect("returns the failed stage without exposing provider secrets through HTTP", () => {