{"record":{"id":"98adcf0298df3e33","repo":"calcom/cal.diy","slug":"something-went-wrong-unable-to-get-recording-acce","errorCode":null,"errorMessage":"Something went wrong! Unable to get recording access link","messagePattern":"Something went wrong! Unable to get recording access link","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/app-store/dailyvideo/lib/VideoApiAdapter.ts","lineNumber":425,"sourceCode":"      try {\n        const res = await fetcher(`/recordings?room_name=${roomName}`).then(\n          getRecordingsResponseSchema.parse\n        );\n        return Promise.resolve(res);\n      } catch {\n        throw new Error(\"Something went wrong! Unable to get recording\");\n      }\n    },\n    createInstantCalVideoRoom: (endTime: string) => createInstantMeeting(endTime, region),\n    getRecordingDownloadLink: async (recordingId: string): Promise<GetAccessLinkResponseSchema> => {\n      try {\n        const res = await fetcher(`/recordings/${recordingId}/access-link?valid_for_secs=43200`).then(\n          getAccessLinkResponseSchema.parse\n        );\n        return Promise.resolve(res);\n      } catch (err) {\n        console.log(\"err\", err);\n        throw new Error(\"Something went wrong! Unable to get recording access link\");\n      }\n    },\n    getAllTranscriptsAccessLinkFromRoomName: async (roomName: string): Promise<Array<string>> => {\n      try {\n        const allTranscripts = await fetcher(`/transcript?room_name=${roomName}`).then(getTranscripts.parse);\n\n        if (!allTranscripts.data.length) return [];\n\n        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    },","sourceCodeStart":407,"sourceCodeEnd":443,"githubUrl":"https://github.com/calcom/cal.diy/blob/176037d0afbe572f870a3c702985e7cd83fe6c0c/packages/app-store/dailyvideo/lib/VideoApiAdapter.ts#L407-L443","documentation":"`getRecordingDownloadLink` wraps `fetcher(`/recordings/${recordingId}/access-link?valid_for_secs=43200`)` (Zod-parsed via `getAccessLinkResponseSchema`) and re-throws a generic Error on any failure. The original cause is logged via `console.log(\"err\", err)` then discarded.","triggerScenarios":"Daily API rejects the access-link request (invalid/expired `recordingId`, auth failure, rate limit), the access link has already expired, or the response shape fails `getAccessLinkResponseSchema`.","commonSituations":"Recording id typo or from a deleted recording; Daily API credential invalid; recording retention period elapsed so Daily returns 404; schema drift after a Daily API update; transient network failure.","solutions":["Preserve the cause: `throw new Error(..., { cause: err })` and remove the `console.log` in favor of structured logging.","Confirm `recordingId` corresponds to an existing, non-expired Daily recording.","Verify the Daily API credential is valid and has recordings:access scope.","Check `getAccessLinkResponseSchema` against the current Daily access-link response shape."],"exampleFix":"// before\n} catch (err) {\n  console.log(\"err\", err);\n  throw new Error(\"Something went wrong! Unable to get recording access link\");\n}\n\n// after\n} catch (err) {\n  logger.warn(\"Daily access-link fetch failed\", { recordingId, err });\n  throw new Error(`Unable to get recording access link for ${recordingId}`, { cause: err });\n}","handlingStrategy":"try-catch","validationCode":"if (!recordingId || typeof recordingId !== \"string\") {\n  throw new Error(\"recordingId required to fetch access link\");\n}","typeGuard":"function isAccessLinkResponse(r: unknown): r is GetAccessLinkResponseSchema {\n  return getAccessLinkResponseSchema.safeParse(r).success;\n}","tryCatchPattern":"try {\n  return await adapter.getRecordingDownloadLink(recordingId);\n} catch (e) {\n  if (e instanceof Error && /recording access link/.test(e.message)) {\n    return null;\n  }\n  throw e;\n}","preventionTips":["Preserve the cause and use structured logging instead of console.log.","Verify recordingId exists and hasn't expired before requesting the link.","Keep `getAccessLinkResponseSchema` aligned with Daily's API.","Refresh Daily credentials before the access token expires."],"tags":["video","daily","recordings","swallowed-error","upstream-api"],"backgroundTag":null,"analyzedSha":"176037d0afbe572f870a3c702985e7cd83fe6c0c","analyzedAt":"2026-08-12T19:12:41.464Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}