ruvnet/ruflo · error · QECoreError

Failed to cancel task

Error message

Failed to cancel task

What it means

The QECoreBridge task's cancel() propagated an exception from the underlying taskService (task already terminal, connection lost, or unknown task). The catch logs the task id and wraps the failure in QECoreError so callers see a uniform bridge-level cancel failure.

Source

Thrown at v3/plugins/agentic-qe/src/bridges/QECoreBridge.ts:558

        success: result.success,
        data: result.data,
        error: result.error,
        durationMs: result.durationMs,
      };
    } catch (error) {
      this.logger.error(`Failed to wait for task: ${this.id}`, error);
      throw new QECoreError('Failed to wait for task', error as Error);
    }
  }

  async cancel(): Promise<void> {
    try {
      this.logger.debug(`Cancelling task: ${this.id}`);
      await this.taskService.cancel(this.id);
      this._status = 'cancelled';
    } catch (error) {
      this.logger.error(`Failed to cancel task: ${this.id}`, error);
      throw new QECoreError('Failed to cancel task', error as Error);
    }
  }

  async getProgress(): Promise<TaskProgress> {
    try {
      const status = await this.taskService.getStatus(this.id);
      this._status = status.status;

      return {
        percentage: status.progress || 0,
        currentStep: status.currentStep || 'Unknown',
        totalSteps: status.totalSteps || 0,
        completedSteps: status.completedSteps || 0,
        estimatedRemainingMs: this.estimateRemaining(status),
      };
    } catch (error) {
      this.logger.error(`Failed to get task progress: ${this.id}`, error);
      throw new QECoreError('Failed to get progress', error as Error);

View on GitHub (pinned to fa13ee4ad6)

Solutions

  1. Check the task is in a cancellable state before cancelling.
  2. Inspect the underlying error from the cancel call.
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at v3/plugins/agentic-qe/src/bridges/QECoreBridge.ts:558 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of ruvnet/ruflo@fa13ee4ad6 (2026-08-18). Data as JSON: /api/errors/4ac772f93bd63309. Report an issue: GitHub.