{"record":{"id":"706c8cb778fcbc9b","repo":"calcom/cal.diy","slug":"something-went-wrong-unable-to-submit-batch-proce","errorCode":null,"errorMessage":"Something went wrong! Unable to submit batch processor job","messagePattern":"Something went wrong! Unable to submit batch processor job","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/app-store/dailyvideo/lib/VideoApiAdapter.ts","lineNumber":470,"sourceCode":"        const allTranscriptsIds = allTranscripts.data.map((transcript) => transcript.transcriptId);\n        const allTranscriptsAccessLink = await processTranscriptsInBatches(allTranscriptsIds);\n        const accessLinks = await Promise.all(allTranscriptsAccessLink);\n\n        return Promise.resolve(accessLinks);\n      } catch (err) {\n        console.log(\"err\", err);\n        throw new Error(\"Something went wrong! Unable to get transcription access link\");\n      }\n    },\n    submitBatchProcessorJob: async (body: batchProcessorBody): Promise<TSubmitBatchProcessorJobRes> => {\n      try {\n        const batchProcessorJob = await postToDailyAPI(\"/batch-processor\", body).then(\n          ZSubmitBatchProcessorJobRes.parse\n        );\n        return batchProcessorJob;\n      } catch (err) {\n        console.log(\"err\", err);\n        throw new Error(\"Something went wrong! Unable to submit batch processor job\");\n      }\n    },\n    getTranscriptsAccessLinkFromRecordingId: async (\n      recordingId: string\n    ): Promise<TGetTranscriptAccessLink[\"transcription\"] | { message: string }> => {\n      try {\n        const batchProcessorJobs = await fetcher(`/batch-processor?recordingId=${recordingId}`).then(\n          getBatchProcessJobs.parse\n        );\n        if (!batchProcessorJobs.data.length) {\n          return { message: `No Batch processor jobs found for recording id ${recordingId}` };\n        }\n\n        const transcriptJobId = batchProcessorJobs.data.filter(\n          (job) => job.preset === \"transcript\" && job.status === \"finished\"\n        )?.[0]?.id;\n\n        if (!transcriptJobId) return [];","sourceCodeStart":452,"sourceCodeEnd":488,"githubUrl":"https://github.com/calcom/cal.diy/blob/176037d0afbe572f870a3c702985e7cd83fe6c0c/packages/app-store/dailyvideo/lib/VideoApiAdapter.ts#L452-L488","documentation":"Thrown by submitBatchProcessorJob. It POSTs a batch-processor body to Daily via postToDailyAPI('/batch-processor', body) and validates the result with ZSubmitBatchProcessorJobRes. Any network failure, non-2xx Daily response, or Zod parse failure is collapsed into this generic message.","triggerScenarios":"submitBatchProcessorJob(body) called with a body that Daily rejects (e.g. missing recordingId, unsupported preset), when Daily returns 4xx/5xx, when postToDailyAPI throws due to missing credentials, or when the response does not match ZSubmitBatchProcessorJobRes.","commonSituations":"Daily batch-processor feature not enabled for the workspace; body.recordingId points to a deleted recording; Daily API key invalid; response schema drift after a Daily API version bump.","solutions":["Read the swallowed original error from the console.log to distinguish network vs. parse vs. Daily-API failure.","Validate body against batchProcessorBody before calling (e.g. ensure preset and recordingId are present).","Confirm the Daily integration has batch-processor entitlement and a valid API key.","Compare the live Daily /batch-processor response with ZSubmitBatchProcessorJobRes and update if drifted.","Re-throw with the original cause preserved."],"exampleFix":"// before\n} catch (err) {\n  console.log(\"err\", err);\n  throw new Error(\"Something went wrong! Unable to submit batch processor job\");\n}\n\n// after\n} catch (err) {\n  throw new Error(`Unable to submit Daily batch processor job: ${err instanceof Error ? err.message : String(err)}`, { cause: err });\n}","handlingStrategy":"validation","validationCode":"import { z } from \"zod\";\nconst batchBodySchema = z.object({\n  recordingId: z.string().min(1),\n  preset: z.enum([\"transcript\", \"mp4\", \"text\"]),\n});\nconst parsed = batchBodySchema.parse(body);","typeGuard":"const isBatchProcessorBody = (b: unknown): b is { recordingId: string; preset: string } =>\n  typeof b === \"object\" && b !== null && typeof (b as any).recordingId === \"string\" && typeof (b as any).preset === \"string\";","tryCatchPattern":"try {\n  const job = await adapter.submitBatchProcessorJob(body);\n} catch (err) {\n  if (err instanceof Error && /submit batch processor/i.test(err.message)) {\n    logger.error(\"batch submit failed\", { body, cause: err });\n  }\n  throw err;\n}","preventionTips":["Validate body shape with Zod before submitting.","Confirm recordingId exists via getRecordings before submitting a transcript job.","Check Daily workspace entitlements for the batch-processor feature."],"tags":["daily-video","batch-processor","oauth-api","error-swallowing","zod"],"backgroundTag":null,"analyzedSha":"176037d0afbe572f870a3c702985e7cd83fe6c0c","analyzedAt":"2026-08-12T19:12:41.464Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}