# PollingTaskRunner.InterruptActiveTask

```go
func (*PollingTaskRunner) InterruptActiveTask(ctx context.Context) error
```

Interrupt the active task by canceling its lease extension and reporting it as failed.

If there is no active task, the method returns nil.

## Parameters

**ctx**

`context.Context`

required: true

The context used to report the interrupted task.

## Returns

An error if the active task could not be reported as failed.

```go title="Go"
if err := runner.InterruptActiveTask(ctx); err != nil {
    return err
}
```
