| @@ -5,6 +5,7 @@ import { · 4 unmodified lines |
| 5 | 5 | } from "@t3tools/contracts"; |
| 6 | 6 | import { |
| 7 | 7 | SshCommandSpawnError, |
| 8 | + SshCommandTimeoutError, |
| 8 | 9 | SshHttpBridgeError, |
| 9 | 10 | SshPasswordPromptError, |
| 10 | 11 | } from "@t3tools/ssh/errors"; |
| @@ -22,7 +23,7 @@ import { · 11 unmodified lines |
| 22 | 23 | DesktopSshEnvironmentRequestError, |
| 23 | 24 | ensureSshEnvironment, |
| 24 | 25 | fetchSshEnvironmentDescriptor, |
| 25 | | − toDesktopSshOperationPresentationError, |
| 26 | + toDesktopSshIpcPresentationError, |
| 26 | 27 | } from "./sshEnvironment.ts"; |
| 27 | 28 | import * as DesktopSshEnvironment from "../../ssh/DesktopSshEnvironment.ts"; |
| 28 | 29 | import * as DesktopSshPasswordPrompts from "../../ssh/DesktopSshPasswordPrompts.ts"; |
| @@ -102,12 +103,23 @@ describe("SSH environment IPC", () => { · 73 unmodified lines |
| 102 | 103 | cause, |
| 103 | 104 | }); |
| 104 | 105 | |
| 105 | | − const presentation = toDesktopSshOperationPresentationError(structured); |
| 106 | + const presentation = toDesktopSshIpcPresentationError(structured); |
| 106 | 107 | assert.equal(structured.message, "Failed to spawn SSH command for devbox."); |
| 107 | 108 | assert.equal(presentation.message, cause.message); |
| 108 | 109 | assert.strictEqual(presentation.cause, structured); |
| 109 | 110 | }); |
| 110 | 111 | |
| 112 | + it("passes structural SSH errors without process causes through the IPC boundary", () => { |
| 113 | + const structured = new SshCommandTimeoutError({ |
| 114 | + command: "ssh", |
| 115 | + argumentCount: 0, |
| 116 | + target: "devbox", |
| 117 | + timeoutMs: 30_000, |
| 118 | + }); |
| 119 | + |
| 120 | + assert.strictEqual(toDesktopSshIpcPresentationError(structured), structured); |
| 121 | + }); |
| 122 | + |
| 111 | 123 | it.effect("fetches and decodes the remote environment descriptor", () => { |
| 112 | 124 | const requestUrls: string[] = []; |
| 113 | 125 | const layer = makeHttpClientLayer((request) => |