diff --git a/lib/api-functions.ts b/lib/api-functions.ts index f6ef813..1ad83dd 100644 --- a/lib/api-functions.ts +++ b/lib/api-functions.ts @@ -236,6 +236,10 @@ function sanitizeTask(task): void { break; case "refreshObject": + if (typeof task.objectName !== "string") + throw new Error("Missing 'objectName' property"); + break; + case "deleteObject": if (typeof task.objectName !== "string" || !task.objectName.length) throw new Error("Missing 'objectName' property");