Skip to main content

markFailed

client.tasks.markFailed(taskId: string): Promise<Task>

Marks a task as failed.

Updates the task's status to indicate that the task could not be completed successfully. This is typically called when errors occur or when task objectives cannot be achieved. Returns the updated task object.

Parameters​

ParameterTypeRequiredDescription
taskIdstringYesThe unique identifier of the task to mark as failed

Returns​

Promise<Task> — A promise that resolves to the updated Task object with failed status

Example​

import { CodeBoltClient } from '@codebolt/clientsdk';

const client = new CodeBoltClient();

const result = await client.tasks.markFailed('taskId');
console.log(result);