{"record":{"id":"982c50941bad2133","repo":"twentyhq/twenty","slug":"failed-to-create-callrecording-standard-objects-fo","errorCode":null,"errorMessage":"Failed to create CallRecording standard objects for workspace ${workspaceId}: ${JSON.stringify(validateAndBuildResult, null, 2)}","messagePattern":"Failed to create CallRecording standard objects for workspace (.+?): (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/twenty-server/src/database/commands/upgrade-version-command/2-10/2-10-workspace-command-1799000055000-sync-call-recording-standard-objects.command.ts","lineNumber":540,"sourceCode":"            2,\n          )}`,\n        );\n      }\n    }\n\n    const validateAndBuildResult =\n      await this.workspaceMigrationValidateBuildAndRunService.validateBuildAndRunLegacyWorkspaceMigration(\n        {\n          isSystemBuild: true,\n          applicationUniversalIdentifier:\n            twentyStandardFlatApplication.universalIdentifier,\n          workspaceId,\n          allFlatEntityOperationByMetadataName,\n        },\n      );\n\n    if (validateAndBuildResult.status === 'fail') {\n      throw new Error(\n        `Failed to create CallRecording standard objects for workspace ${workspaceId}: ${JSON.stringify(\n          validateAndBuildResult,\n          null,\n          2,\n        )}`,\n      );\n    }\n\n    this.logger.log(\n      `Applied ${totalOperationCount} CallRecording standard metadata operations for workspace ${workspaceId}`,\n    );\n  }\n}\n","sourceCodeStart":522,"sourceCodeEnd":554,"githubUrl":"https://github.com/twentyhq/twenty/blob/1f5dd2bbd2a8da3419c8cfd52dd545c0024df1a6/packages/twenty-server/src/database/commands/upgrade-version-command/2-10/2-10-workspace-command-1799000055000-sync-call-recording-standard-objects.command.ts#L522-L554","documentation":"Thrown by the 2.10 CallRecording sync command after all collision renames succeed, when the final create migration for the new CallRecording standard objects/fields returns status 'fail'. The full validateAndBuildResult JSON is embedded in the message. This is the last step, so it leaves renames committed but the create unapplied.","triggerScenarios":"Running the CallRecording create step on a workspace where renames committed but the new standard objects/fields batch is rejected — e.g. a residual name collision the rename missed, a missing parent object, or a duplicate universal identifier.","commonSituations":"Rename step partially succeeded leaving a name still colliding; stale cache; a prior aborted run already created some CallRecording entities (duplicates); standard CallRecording metadata version mismatch with the workspace.","solutions":["Parse the validateAndBuildResult JSON embedded in the message for the precise create rejection.","Verify all collision renames actually committed for the failing workspace before retrying the create.","Recompute the workspace cache and re-run the command (it re-detects collisions idempotently).","Run --dryRun to confirm the planned operation count before committing."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Dry-run to preview total operation count; confirm renames are committed before the create runs:\nawait workspaceCacheService.invalidate(workspaceId);\nconst { flatObjectMetadataMaps } = await workspaceCacheService.getOrRecompute(workspaceId, ['flatObjectMetadataMaps']);\nconst stillColliding = findCallRecordingObjectNameCollisions(flatObjectMetadataMaps);\nif (stillColliding.length > 0) throw new Error('Collisions still present; renames must commit before create');","typeGuard":null,"tryCatchPattern":"// Parse the embedded validateAndBuildResult JSON to decide next action:\ntry {\n  await command.runOnWorkspace({ workspaceId, options });\n} catch (err) {\n  const match = /Failed to create CallRecording standard objects[\\s\\S]*?(\\{[\\s\\S]*\\})/.exec(err.message);\n  const result = match ? JSON.parse(match[1]) : null;\n  logger.error(`CallRecording create failed for workspace ${workspaceId}`, result ?? err);\n  failedWorkspaces.push(workspaceId);\n}","preventionTips":["Verify all collision renames actually committed before the create step retries.","Run --dryRun to confirm the planned operation count.","Recompute the cache; the command re-detects collisions idempotently.","Parse the embedded validateAndBuildResult JSON before retrying."],"tags":["migration","workspace-upgrade","call-recording","create","data-integrity"],"backgroundTag":null,"analyzedSha":"1f5dd2bbd2a8da3419c8cfd52dd545c0024df1a6","analyzedAt":"2026-08-12T15:37:27.593Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}