{"record":{"id":"90af61fcf5ad0360","repo":"twentyhq/twenty","slug":"failed-to-create-callrecording-recordingrequeststa","errorCode":null,"errorMessage":"Failed to create CallRecording recordingRequestStatus metadata for workspace ${workspaceId}: ${JSON.stringify(validateAndBuildResult, null, 2)}","messagePattern":"Failed to create CallRecording recordingRequestStatus metadata for workspace (.+?): (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/twenty-server/src/database/commands/upgrade-version-command/2-14/2-14-workspace-command-1799000065000-sync-call-recording-request-status.command.ts","lineNumber":169,"sourceCode":"            twentyStandardFlatApplication.universalIdentifier,\n          workspaceId,\n          allFlatEntityOperationByMetadataName: {\n            fieldMetadata: {\n              flatEntityToCreate: recordingRequestStatusFieldsToCreate,\n              flatEntityToDelete: [],\n              flatEntityToUpdate: [],\n            },\n            viewField: {\n              flatEntityToCreate: recordingRequestStatusViewFieldsToCreate,\n              flatEntityToDelete: [],\n              flatEntityToUpdate: [],\n            },\n          },\n        },\n      );\n\n    if (validateAndBuildResult.status === 'fail') {\n      throw new Error(\n        `Failed to create CallRecording recordingRequestStatus metadata for workspace ${workspaceId}: ${JSON.stringify(\n          validateAndBuildResult,\n          null,\n          2,\n        )}`,\n      );\n    }\n\n    this.logger.log(\n      `Created ${totalOperationCount} CallRecording recordingRequestStatus metadata item(s) for workspace ${workspaceId}`,\n    );\n  }\n}\n\nconst hasFieldNameConflict = ({\n  flatFieldMetadatas,\n  callRecordingObjectMetadata,\n}: {","sourceCodeStart":151,"sourceCodeEnd":187,"githubUrl":"https://github.com/twentyhq/twenty/blob/1f5dd2bbd2a8da3419c8cfd52dd545c0024df1a6/packages/twenty-server/src/database/commands/upgrade-version-command/2-14/2-14-workspace-command-1799000065000-sync-call-recording-request-status.command.ts#L151-L187","documentation":"Thrown by the 2.14 command that syncs CallRecording.recordingRequestStatus metadata when validateBuildAndRunLegacyWorkspaceMigration returns status 'fail' after attempting to create recordingRequestStatusViewFieldsToCreate. The full validateAndBuildResult object is JSON-stringified into the message so the failing validations are visible. It indicates the build phase rejected the view-field creation payload for the workspace.","triggerScenarios":"Running the 2.14 upgrade on a workspace whose CallRecording standard object or its base fieldMetadata is missing/inconsistent (so the view fields cannot attach), or where the recordingRequestStatus view-field universal identifiers collide with existing rows. Also triggered if the standard seed defining these view fields is absent from the image.","commonSituations":"Workspace on an older release whose CallRecording object was added by a partial earlier migration; image built from a branch that does not yet include the recordingRequestStatus standard definition; concurrent upgrade runs racing on the same workspace.","solutions":["Inspect the JSON payload in the error: identify which flatEntityToCreate entry failed and why (codes in the report).","Confirm the CallRecording standard object and its base fields exist in the workspace's metadata before this command runs (check the prerequisite 2.14 command that introduces CallRecording).","Ensure the deployed image contains the standard seed for recordingRequestStatus view fields; rebuild if missing.","Re-run the upgrade for the workspace after correcting the underlying metadata rows."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Before running this command, confirm the CallRecording object and its\n// prerequisite standard fields exist and are active for the workspace.\nconst recObj = await dataSource.query(`\n  SELECT id FROM core.\"objectMetadata\" WHERE \"nameSingular\" = 'callRecording' AND \"isActive\" = true\n`);\nif (!recObj.length) {\n  throw new Error('Prerequisite CallRecording object missing; run earlier 2.14 commands first');\n}","typeGuard":"function isFailResult(r: unknown): r is { status: 'fail' } {\n  return typeof r === 'object' && r !== null && (r as any).status === 'fail';\n}","tryCatchPattern":"try {\n  const res = await service.validateBuildAndRunLegacyWorkspaceMigration(payload);\n  if (res.status === 'fail') throw new Error(`...${JSON.stringify(res, null, 2)}`);\n} catch (err) {\n  upgradeAudit.record(workspaceId, command.id, err);\n  throw err;\n}","preventionTips":["Ensure CallRecording standard object migrations run in version order before this command.","Deploy the matching standard seed in the same image as the command.","Avoid running two upgrade runners concurrently on the same workspace."],"tags":["migration","workspace-upgrade","metadata-validation","call-recording"],"backgroundTag":null,"analyzedSha":"1f5dd2bbd2a8da3419c8cfd52dd545c0024df1a6","analyzedAt":"2026-08-12T15:37:27.593Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}