toeverything/AFFiNE · error · CopilotTranscriptionJobExists

copilot_transcription_job_exists

copilot_transcription_job_exists

Error message

Transcription job already exists

What it means

Raised in `submitTask` when an existing copilot transcription task for the same user/workspace/blob is still in 'pending' or 'running' status — the CopilotTranscriptionJobExists guard prevents duplicate concurrent transcription of the same audio blob. The input at fault is a repeated submission for a blob that already has an active job.

Source

Thrown at packages/backend/server/src/plugins/copilot/transcript/service.ts:432

  async submitTask(
    userId: string,
    workspaceId: string,
    blobId: string,
    blobs: FileUpload[],
    input?: TranscriptionSubmitInput
  ): Promise<TranscriptionJob> {
    const existingTask = await this.models.copilotTranscriptTask.getWithUser(
      userId,
      workspaceId,
      undefined,
      blobId
    );
    if (
      existingTask &&
      (existingTask.status === 'pending' || existingTask.status === 'running')
    ) {
      throw new CopilotTranscriptionJobExists();
    }

    await this.runtime.assertRoute(
      'transcript.audio',
      {},
      {
        user: userId,
        workspace: workspaceId,
        featureKind: 'transcript',
        builtInRouteId: TRANSCRIPT_PROMPT_REF,
      }
    );
    const infos = await this.persistUploads(userId, workspaceId, blobId, blobs);
    const payload = this.createCanonicalPayload(blobId, infos, input);
    const generation = randomUUID();
    const task = await this.models.copilotTranscriptTask.create({
      userId,
      workspaceId,

View on GitHub (pinned to 591f874dad)

Solutions

  1. Use the existing transcription job instead of creating a duplicate for the same audio.
  2. Wait for or poll the existing job to completion.
  3. Delete or let the previous job settle before submitting the same audio again.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/backend/server/src/plugins/copilot/transcript/service.ts:432 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of toeverything/AFFiNE@591f874dad (2026-08-18). Data as JSON: /api/errors/e3325e4655ff6613. Report an issue: GitHub.