Skip to main content

# Cancel One Request (LCC.assist.cancel)

## Declaration​

    ok, err, task = LCC.assist.cancel(id, timeout?)

## Parameters​

- id
  String. Assist request ID.
- timeout
  Number, optional. Cancel request timeout in seconds. Defaults to `10`.

## Return Values​

- ok
  Boolean. `true` when cancellation succeeds; otherwise `false`.
- err
  String or `nil`. Failure reason.
- task
  Table or `nil`. The cancelled task object.

## Notes​

> Cancels one unfinished assist request.
> The request is also removed from the current script's unfinished request set.

## Example​

    local ok, err, task = LCC.assist.cancel(taskId)
    if not ok then
        nLog("failed to cancel assist request", err)
    end