Skip to content

Commit 1a444b2

Browse files
juliusmarmingecodex
andcommitted
Keep nested relay causes out of warning fields
Co-authored-by: codex <[email protected]>
1 parent da6f838 commit 1a444b2

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎apps/web/src/cloud/linkEnvironment.test.ts‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -576,13 +576,13 @@ describe("web cloud link environment client", () => {
576576
relayUrlInputLength: relayUrl.length,
577577
relayUrlProtocol: "https:",
578578
relayUrlHostname: "relay.example.test",
579+
causeTag: "ManagedRelayRequestFailedError",
579580
});
580581
expect(logFields).not.toHaveProperty("relayUrl");
581-
const logText = [
582-
...(capturedLogs[0]?.filter((value): value is string => typeof value === "string") ??
583-
[]),
584-
String(logFields?.cause),
585-
].join(" ");
582+
expect(logFields).not.toHaveProperty("cause");
583+
const logText = capturedLogs[0]
584+
?.filter((value): value is string => typeof value === "string")
585+
.join(" ");
586586
for (const secret of [
587587
"relay-user",
588588
"relay-password",

‎apps/web/src/cloud/linkEnvironment.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ export function unlinkPrimaryEnvironmentFromCloud(input: {
605605
...(error.relayUrlHostname === undefined
606606
? {}
607607
: { relayUrlHostname: error.relayUrlHostname }),
608-
cause: error,
608+
causeTag: cause._tag,
609609
});
610610
}),
611611
);

0 commit comments

Comments
 (0)