{"record":{"id":"10e0a078b3cf762e","repo":"vercel/ai","slug":"transcriptionjobfailed-10e0a0","errorCode":"TranscriptionJobFailed","errorMessage":"Transcription job failed","messagePattern":"Transcription job failed","errorType":"error_code","errorClass":"AISDKError","httpStatus":null,"severity":"error","filePath":"packages/revai/src/revai-transcription-model.ts","lineNumber":203,"sourceCode":"      const pollingResult = await getFromApi({\n        url: this.config.url({\n          path: `/speechtotext/v1/jobs/${jobId}`,\n          modelId: this.modelId,\n        }),\n        validateUrl: false,\n        headers: combineHeaders(this.config.headers?.(), options.headers),\n        failedResponseHandler: revaiFailedResponseHandler,\n        successfulResponseHandler: createJsonResponseHandler(\n          revaiTranscriptionJobResponseSchema,\n        ),\n        abortSignal: options.abortSignal,\n        fetch: this.config.fetch,\n      });\n\n      jobResponse = pollingResult.value;\n\n      if (jobResponse.status === 'failed') {\n        throw new AISDKError({\n          message: 'Transcription job failed',\n          name: 'TranscriptionJobFailed',\n          cause: jobResponse,\n        });\n      }\n\n      // Wait before polling again (only if we need to continue polling)\n      if (jobResponse.status !== 'transcribed') {\n        await delay(pollingInterval);\n      }\n    }\n\n    const {\n      value: transcriptionResult,\n      responseHeaders,\n      rawValue: rawResponse,\n    } = await getFromApi({\n      url: this.config.url({","sourceCodeStart":185,"sourceCodeEnd":221,"githubUrl":"https://github.com/vercel/ai/blob/69428b1f8b037e4d118fb4853428d5c4e620493c/packages/revai/src/revai-transcription-model.ts#L185-L221","documentation":"Thrown when a polled Rev.ai transcription job reaches status 'failed'. The completed polling result (jobResponse) is attached as cause, containing Rev.ai's failure details. The job was accepted but failed during processing on Rev.ai's side.","triggerScenarios":"During doGenerate's polling loop, jobResponse.status === 'failed' — e.g. corrupt audio, media deletion mid-job, or internal Rev.ai processing error.","commonSituations":"Uploading truncated/corrupt media files; audio codec Rev.ai cannot decode; transient Rev.ai processing failures.","solutions":["Inspect error.cause (the failed job response) for Rev.ai's failure reason","Validate the audio file is complete, decodable, and in a supported format","Re-submit the transcription job (transient failures often succeed on retry)","If persistent, contact Rev.ai support with the job id"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// validate media before submitting\nconst head = await fetch(mediaUrl, { method: 'HEAD' });\nif (!head.ok || Number(head.headers.get('content-length') ?? 0) === 0) {\n  throw new Error('Media file missing or empty');\n}","typeGuard":"function isTranscriptionJobFailed(e) {\n  return typeof e === 'object' && e !== null && e.name === 'TranscriptionJobFailed';\n}","tryCatchPattern":"try {\n  result = await model.doGenerate(options);\n} catch (e) {\n  if (e.name === 'TranscriptionJobFailed') {\n    console.error('Job failed:', e.cause);\n    result = await retryWithBackoff(() => model.doGenerate(options));\n  } else throw e;\n}","preventionTips":["Validate audio integrity and format before submission","Retry transient job failures with exponential backoff","Inspect e.cause for Rev.ai's failure details and alert on persistent job ids"],"tags":["transcription","job-failed","api-error","revai"],"backgroundTag":"api-job-failed","analyzedSha":"69428b1f8b037e4d118fb4853428d5c4e620493c","analyzedAt":"2026-08-30T12:32:21.016Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}