twentyhq/twenty · error · Error
Failed to create CallRecording recordingRequestStatus metada
Error message
Failed to create CallRecording recordingRequestStatus metadata for workspace ${workspaceId}: ${JSON.stringify(validateAndBuildResult, null, 2)} What it means
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.
Source
Thrown at packages/twenty-server/src/database/commands/upgrade-version-command/2-14/2-14-workspace-command-1799000065000-sync-call-recording-request-status.command.ts:169
twentyStandardFlatApplication.universalIdentifier,
workspaceId,
allFlatEntityOperationByMetadataName: {
fieldMetadata: {
flatEntityToCreate: recordingRequestStatusFieldsToCreate,
flatEntityToDelete: [],
flatEntityToUpdate: [],
},
viewField: {
flatEntityToCreate: recordingRequestStatusViewFieldsToCreate,
flatEntityToDelete: [],
flatEntityToUpdate: [],
},
},
},
);
if (validateAndBuildResult.status === 'fail') {
throw new Error(
`Failed to create CallRecording recordingRequestStatus metadata for workspace ${workspaceId}: ${JSON.stringify(
validateAndBuildResult,
null,
2,
)}`,
);
}
this.logger.log(
`Created ${totalOperationCount} CallRecording recordingRequestStatus metadata item(s) for workspace ${workspaceId}`,
);
}
}
const hasFieldNameConflict = ({
flatFieldMetadatas,
callRecordingObjectMetadata,
}: {View on GitHub (pinned to 1f5dd2bbd2)
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.
Defensive patterns
Strategy: validation
Validate before calling
// Before running this command, confirm the CallRecording object and its
// prerequisite standard fields exist and are active for the workspace.
const recObj = await dataSource.query(`
SELECT id FROM core."objectMetadata" WHERE "nameSingular" = 'callRecording' AND "isActive" = true
`);
if (!recObj.length) {
throw new Error('Prerequisite CallRecording object missing; run earlier 2.14 commands first');
} Type guard
function isFailResult(r: unknown): r is { status: 'fail' } {
return typeof r === 'object' && r !== null && (r as any).status === 'fail';
} Try / catch
try {
const res = await service.validateBuildAndRunLegacyWorkspaceMigration(payload);
if (res.status === 'fail') throw new Error(`...${JSON.stringify(res, null, 2)}`);
} catch (err) {
upgradeAudit.record(workspaceId, command.id, err);
throw err;
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Failed to sync CallRecording status metadata for workspace $
- Failed to sync CallRecording navigation command menu item av
- Failed to rename CallRecording name collision for workspace
- Failed to create CallRecording standard objects for workspac
- Migration failed for workspace ${workspaceId} while healing
AI-assisted analysis of twentyhq/twenty@1f5dd2bbd2 (2026-08-12).
Data as JSON: /api/errors/90af61fcf5ad0360.
Report an issue: GitHub.