{"record":{"id":"7f421b5e194bb21d","repo":"toeverything/AFFiNE","slug":"copilot-transcription-audio-not-provided","errorCode":"copilot_transcription_audio_not_provided","errorMessage":"Audio not provided.","messagePattern":"Audio not provided\\.","errorType":"exception","errorClass":"CopilotTranscriptionAudioNotProvided","httpStatus":400,"severity":"error","filePath":"packages/backend/server/src/plugins/copilot/transcript/resolver.ts","lineNumber":347,"sourceCode":"    @Args({ name: 'blob', type: () => GraphQLUpload, nullable: true })\n    blob: FileUpload | null,\n    @Args({ name: 'blobs', type: () => [GraphQLUpload], nullable: true })\n    blobs: FileUpload[] | null,\n    @Args({\n      name: 'input',\n      type: () => SubmitAudioTranscriptionInput,\n      nullable: true,\n    })\n    input: SubmitAudioTranscriptionInput | null\n  ): Promise<TranscriptionResultType | null> {\n    await this.ac\n      .user(user.id)\n      .workspace(workspaceId)\n      .allowLocal()\n      .assert('Workspace.Copilot');\n    const allBlobs = blob ? [blob, ...(blobs || [])].filter(v => !!v) : blobs;\n    if (!allBlobs || allBlobs.length === 0) {\n      throw new CopilotTranscriptionAudioNotProvided();\n    }\n\n    const task = await this.transcript.submitTask(\n      user.id,\n      workspaceId,\n      blobId,\n      // oxlint-disable-next-line typescript/await-thenable\n      await Promise.all(allBlobs),\n      input ?? undefined\n    );\n\n    return this.handleJobResult(task);\n  }\n\n  @Mutation(() => TranscriptionResultType, { nullable: true })\n  async retryTranscriptTask(\n    @CurrentUser() user: CurrentUser,\n    @Args('workspaceId') workspaceId: string,","sourceCodeStart":329,"sourceCodeEnd":365,"githubUrl":"https://github.com/toeverything/AFFiNE/blob/b4c8548c09da21b2898443559a5b846f0ccf5dd8/packages/backend/server/src/plugins/copilot/transcript/resolver.ts#L329-L365","documentation":"submitTranscriptTask requires at least one audio blob upload; when blob/blobs/input all resolve to nothing the resolver throws an 'Audio not provided.' bad-request error before creating a transcription job.","triggerScenarios":"Thrown at packages/backend/server/src/plugins/copilot/transcript/resolver.ts:347 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Attach an audio blob to the transcription request before submitting.","Verify the audio upload completed and its blob id is passed to the resolver.","Check the client code path that records audio to ensure it produces a non-empty file."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b4c8548c09da21b2898443559a5b846f0ccf5dd8","analyzedAt":"2026-08-18T21:16:52.546Z","contentChangedAt":"2026-08-18T21:16:52.546Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}