fix: if failed to validate body, trigger hashed task name flow

This commit is contained in:
2024-10-22 08:20:03 +02:00
parent 42c041a4e0
commit 1869771716

View File

@@ -138,11 +138,14 @@ async function checkIfTaskExists(
},
)
.then((res) => res.json())
.then(({ httpRequest: { body } }) => body);
.then(({ httpRequest }) => httpRequest?.body);
return isEqual(
JSON.parse(Buffer.from(body as string, "base64").toString()),
expectedBody,
return (
body &&
isEqual(
JSON.parse(Buffer.from(body as string, "base64").toString()),
expectedBody,
)
);
}