// Why a transcription failed, so a batch can decide whether to retry it on a // different worker. "transport" = the worker/transport was at fault (remote // unreachable, 5xx) and the audio may still transcribe elsewhere; "transcription" // = the audio itself failed and retrying on another worker is pointless; // "no-audio" = the video has no real audio file (a download/source problem, e.g. // a corrupt-source / failed-extract download), so the batch skips it rather than // recording a failure and a re-download will let it transcribe later. // // In its own module (no deps) so both transcribeOne.ts and the remote client // (remoteTranscribe.ts) can throw it without an import cycle. export class TranscribeError extends Error { constructor( message: string, readonly failureClass: "transport" | "transcription" | "no-audio", ) { super(message); this.name = "TranscribeError"; } }