From 805549aad91cbe854645f36a351ec0ee465bfe53 Mon Sep 17 00:00:00 2001 From: matlorr Date: Tue, 25 Feb 2025 15:41:33 +0100 Subject: [PATCH] Add error message if unpacking of artifact zip fails. --- relay/import.mjs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/relay/import.mjs b/relay/import.mjs index 70cf2b8f..6def89e1 100644 --- a/relay/import.mjs +++ b/relay/import.mjs @@ -31,7 +31,16 @@ async function runProcess(id, cmd, args, cwd) { }); ls.stderr.on('data', (data) => { - progress[id].output += data.toString() + try { + if (args[0].includes("unpack.sh")){ + throw new Error(".zip file of artifact could not be fetched. Make sure it exists and is not expired. \n") + } else { + progress[id].output += data.toString() + } + } catch(e){ + progress[id].output += `Error: ${e.toString()}\n${e.stack}` + } + }); ls.on('close', (code) => {