From 9877c5fd9da0b912a90efc0bfdc3a0ba08b04bfc Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 6 Feb 2024 00:42:37 +0100 Subject: [PATCH] fix: add get_root_job_id typescript-client --- typescript-client/client.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/typescript-client/client.ts b/typescript-client/client.ts index 56badd36b7..346e537278 100644 --- a/typescript-client/client.ts +++ b/typescript-client/client.ts @@ -104,6 +104,9 @@ export async function getRootJobId(jobId?: string): Promise { !clientSet && setClient(); const workspace = getWorkspace(); jobId = jobId ?? getEnv("WM_JOB_ID"); + if (jobId === undefined) { + throw Error("Job ID not set"); + } return await JobService.getRootJobId({ workspace, id: jobId }); }