{"record":{"id":"c520b9774112cfb5","repo":"calcom/cal.diy","slug":"something-went-wrong-unable-to-checkifroomnamemat","errorCode":null,"errorMessage":"Something went wrong! Unable to checkIfRoomNameMatchesInRecording. ${err}","messagePattern":"Something went wrong! Unable to checkIfRoomNameMatchesInRecording\\. (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/app-store/dailyvideo/lib/VideoApiAdapter.ts","lineNumber":504,"sourceCode":"        )?.[0]?.id;\n\n        if (!transcriptJobId) return [];\n\n        const accessLinkRes = await getBatchProcessorJobAccessLink(transcriptJobId);\n\n        return accessLinkRes.transcription;\n      } catch (err) {\n        console.log(\"err\", err);\n        throw new Error(\"Something went wrong! can't get transcripts\");\n      }\n    },\n    checkIfRoomNameMatchesInRecording: async (roomName: string, recordingId: string): Promise<boolean> => {\n      try {\n        const recording = await fetcher(`/recordings/${recordingId}`).then(recordingItemSchema.parse);\n        return recording.room_name === roomName;\n      } catch (err) {\n        console.error(\"err\", err);\n        throw new Error(`Something went wrong! Unable to checkIfRoomNameMatchesInRecording. ${err}`);\n      }\n    },\n    getMeetingInformation: async (roomName: string): Promise<TGetMeetingInformationResponsesSchema> => {\n      try {\n        const res = await fetcher(`/meetings?room=${encodeURIComponent(roomName)}`).then(\n          getMeetingInformationResponseSchema.parse\n        );\n        return res;\n      } catch (err) {\n        console.error(\"err\", err);\n        throw new Error(\"Something went wrong! Unable to get meeting information\");\n      }\n    },\n  };\n};\n\nexport default DailyVideoApiAdapter;\n","sourceCodeStart":486,"sourceCodeEnd":522,"githubUrl":"https://github.com/calcom/cal.diy/blob/176037d0afbe572f870a3c702985e7cd83fe6c0c/packages/app-store/dailyvideo/lib/VideoApiAdapter.ts#L486-L522","documentation":"Thrown by checkIfRoomNameMatchesInRecording. It fetches a single recording via GET /recordings/<recordingId>, parses with recordingItemSchema, and compares room_name. Unlike its siblings, this catch DOES interpolate the original error (${err}), so the real cause is visible in the message string.","triggerScenarios":"GET /recordings/<recordingId> returns 404 (recording deleted), Daily returns non-2xx, recordingItemSchema.parse fails on a shape change, or the recordingId is malformed.","commonSituations":"Recording expired or deleted on Daily side; recordingId passed from a stale booking reference; Daily API key revoked; recording payload schema drift.","solutions":["Read the interpolated ${err} portion of the message for the precise cause.","Confirm the recordingId is current (re-fetch recordings for the room).","Verify Daily credentials.","Update recordingItemSchema if the Daily recording shape changed.","Treat a 404 as 'no match' (return false) instead of throwing, if business logic allows."],"exampleFix":"// before\nconst recording = await fetcher(`/recordings/${recordingId}`).then(recordingItemSchema.parse);\nreturn recording.room_name === roomName;\n\n// after - treat missing recording as no-match\nconst resp = await fetcher(`/recordings/${recordingId}`);\nif (!resp.ok) {\n  if (resp.status === 404) return false;\n  throw new Error(`Daily recordings lookup failed (${resp.status}) for ${recordingId}`);\n}\nconst recording = recordingItemSchema.parse(await resp.json());\nreturn recording.room_name === roomName;","handlingStrategy":"try-catch","validationCode":"if (!recordingId || !roomName) throw new TypeError(\"recordingId and roomName required\");","typeGuard":"const isRecordingItem = (v: unknown): v is { room_name: string } =>\n  typeof v === \"object\" && v !== null && typeof (v as any).room_name === \"string\";","tryCatchPattern":"try {\n  const matches = await adapter.checkIfRoomNameMatchesInRecording(roomName, recordingId);\n} catch (err) {\n  // err.message interpolates the original cause - read it\n  if (/404/.test(err.message)) return false; // recording gone -> no match\n  throw err;\n}","preventionTips":["Read the interpolated ${err} suffix for the precise HTTP status.","Treat a 404 as 'no match' instead of an exception.","Cache recording lookups to avoid repeated 404s on deleted recordings."],"tags":["daily-video","recordings","validation","oauth-api"],"backgroundTag":null,"analyzedSha":"176037d0afbe572f870a3c702985e7cd83fe6c0c","analyzedAt":"2026-08-12T19:12:41.464Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}