MCPcopy Create free account
hub / github.com/RealDevSquad/website-backend / assertTaskExists

Function assertTaskExists

utils/progresses.js:69–75  ·  view source on GitHub ↗
(taskId)

Source from the content-addressed store, hash-verified

67 * @returns {Promise<void>} A promise that resolves if the task exists and rejects with a `NotFound` error if the task does not exist.
68 */
69const assertTaskExists = async (taskId) => {
70 const { taskData } = await fetchTask(taskId);
71 if (!taskData) {
72 throw new NotFound(`Task with id ${taskId} does not exist.`);
73 }
74 return taskData.title;
75};
76
77/**
78 * Checks if a user or task with the given ID exists in the system.

Callers 2

assertUserOrTaskExistsFunction · 0.85
createProgressDocumentFunction · 0.85

Calls 1

fetchTaskFunction · 0.85

Tested by

no test coverage detected