diff --git a/client/src/commands/run.ts b/client/src/commands/run.ts index ba0e48b84..8523d203d 100644 --- a/client/src/commands/run.ts +++ b/client/src/commands/run.ts @@ -19,7 +19,12 @@ import { import { isOutputHtmlEnabled } from "../components/Helper/SettingHelper"; import { LogFn as LogChannelFn } from "../components/LogChannel"; import { showResult } from "../components/ResultPanel"; -import { OnLogFn, RunResult, getSession } from "../connection"; +import { + ErrorRepresentation, + OnLogFn, + RunResult, + getSession, +} from "../connection"; import { profileConfig, switchProfile } from "./profile"; interface FoldingBlock { @@ -233,7 +238,7 @@ export async function runTask( return cancelled ? undefined : session.run(code); } -const isErrorRep = (err: unknown): err is SessionError => { +const isErrorRep = (err: unknown): err is ErrorRepresentation => { if ( err && typeof err === "object" && diff --git a/client/src/connection/index.ts b/client/src/connection/index.ts index 04eddcaa7..d9a9a12fd 100644 --- a/client/src/connection/index.ts +++ b/client/src/connection/index.ts @@ -12,6 +12,7 @@ import { import { getSession as getCOMSession } from "./com"; import { Config as RestConfig, getSession as getRestSession } from "./rest"; import { + Error2 as ComputeError, LogLine as ComputeLogLine, LogLineTypeEnum as ComputeLogLineTypeEnum, } from "./rest/api/compute"; @@ -20,6 +21,7 @@ import { getSession as getSSHSession } from "./ssh"; let profileConfig: ProfileConfig; +export type ErrorRepresentation = ComputeError; export type LogLine = ComputeLogLine; export type LogLineTypeEnum = ComputeLogLineTypeEnum; export type OnLogFn = (logs: LogLine[]) => void;