{"record":{"id":"0a61cad88efe0537","repo":"twentyhq/twenty","slug":"failed-to-add-the-calendarevent-call-recording-tab","errorCode":null,"errorMessage":"Failed to add the CalendarEvent Call Recording tab for workspace ${workspaceId}: ${JSON.stringify(validateAndBuildResult, null, 2)}","messagePattern":"Failed to add the CalendarEvent Call Recording tab for workspace (.+?): (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/twenty-server/src/database/commands/upgrade-version-command/2-31/2-31-workspace-command-1786437483000-add-calendar-event-call-recording-tab.command.ts","lineNumber":157,"sourceCode":"            twentyStandardFlatApplication.universalIdentifier,\n          workspaceId,\n          allFlatEntityOperationByMetadataName: {\n            pageLayoutTab: {\n              flatEntityToCreate: pageLayoutTabsToCreate,\n              flatEntityToDelete: [],\n              flatEntityToUpdate: [],\n            },\n            pageLayoutWidget: {\n              flatEntityToCreate: pageLayoutWidgetsToCreate,\n              flatEntityToDelete: [],\n              flatEntityToUpdate: [],\n            },\n          },\n        },\n      );\n\n    if (validateAndBuildResult.status === 'fail') {\n      throw new Error(\n        `Failed to add the CalendarEvent Call Recording tab for workspace ${workspaceId}: ${JSON.stringify(\n          validateAndBuildResult,\n          null,\n          2,\n        )}`,\n      );\n    }\n\n    this.logger.log(\n      `Added the CalendarEvent Call Recording tab for workspace ${workspaceId}`,\n    );\n  }\n}\n","sourceCodeStart":139,"sourceCodeEnd":171,"githubUrl":"https://github.com/twentyhq/twenty/blob/1f5dd2bbd2a8da3419c8cfd52dd545c0024df1a6/packages/twenty-server/src/database/commands/upgrade-version-command/2-31/2-31-workspace-command-1786437483000-add-calendar-event-call-recording-tab.command.ts#L139-L171","documentation":"Thrown by the 2.31 command that adds the CalendarEvent Call Recording tab. It creates page-layout widgets/tabs via validateBuildAndRunLegacyWorkspaceMigration; on status === 'fail' it throws with the full report embedded. The report shows which page-layout-widget/tab failed validation.","triggerScenarios":"The CalendarEvent record page layout the tab attaches to is missing or was customised away; the Call Recording object/relation referenced by the tab widget does not exist in the workspace; a tab with the same universalIdentifier already exists (collision the idempotency check missed); the widget configuration references an absent view.","commonSituations":"Workspace where the CalendarEvent record page was replaced by a custom layout; Call Recording standard object not yet seeded (skipped earlier command); partial prior run that created the tab metadata but not its widgets.","solutions":["Parse the JSON report to find the failing widget/tab and error code.","Ensure the CalendarEvent record page layout and the Call Recording object exist for the workspace.","Clear any partially-created tab/widget rows for that workspace, then re-run the 2.31 command."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Confirm the CalendarEvent record page layout and Call Recording object exist:\nconst layout = flatPageLayoutMaps.byUniversalIdentifier[CALENDAR_EVENT_RECORD_PAGE_UI];\nconst callRecording = flatObjectMetadataMaps.byUniversalIdentifier[CALL_RECORDING_UI];\nif (!isDefined(layout) || !isDefined(callRecording)) { /* seed missing pieces first */ }","typeGuard":null,"tryCatchPattern":"try {\n  await command.runOnWorkspace({ workspaceId, options });\n} catch (e) {\n  const report = JSON.parse(e.message.split(':').slice(1).join(':').trim());\n  logger.error({ workspaceId, report }, 'Call Recording tab add failed');\n}","preventionTips":["Run the upgrade that seeds the Call Recording standard object before this 2.31 command.","Remove partially-created tab/widget rows before retrying."],"tags":["migration","upgrade-command","validate-and-build","workspace","page-layout-widget","calendar-event","call-recording"],"backgroundTag":null,"analyzedSha":"1f5dd2bbd2a8da3419c8cfd52dd545c0024df1a6","analyzedAt":"2026-08-12T15:37:27.593Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}