twentyhq/twenty · error · Error
Failed to set displayedMaxRows on calendarEvent.description
Error message
Failed to set displayedMaxRows on calendarEvent.description for workspace ${workspaceId}: ${JSON.stringify(validateAndBuildResult, null, 2)} What it means
Thrown by the 2.2 command that sets displayedMaxRows on the calendarEvent.description field when validateBuildAndRunLegacyWorkspaceMigration returns status 'fail' for the fieldToUpdate update payload. The full validateAndBuildResult is JSON-stringified into the message.
Source
Thrown at packages/twenty-server/src/database/commands/upgrade-version-command/2-2/2-2-workspace-command-1786000000000-set-calendar-event-description-displayed-max-rows.command.ts:111
const validateAndBuildResult =
await this.workspaceMigrationValidateBuildAndRunService.validateBuildAndRunLegacyWorkspaceMigration(
{
allFlatEntityOperationByMetadataName: {
fieldMetadata: {
flatEntityToCreate: [],
flatEntityToDelete: [],
flatEntityToUpdate: [fieldToUpdate],
},
},
workspaceId,
applicationUniversalIdentifier:
twentyStandardFlatApplication.universalIdentifier,
},
);
if (validateAndBuildResult.status === 'fail') {
throw new Error(
`Failed to set displayedMaxRows on calendarEvent.description for workspace ${workspaceId}: ${JSON.stringify(validateAndBuildResult, null, 2)}`,
);
}
this.logger.log(
`Set displayedMaxRows on calendarEvent.description for workspace ${workspaceId}`,
);
}
}
View on GitHub (pinned to 1f5dd2bbd2)
Solutions
- Read the JSON payload to find the failing validation code.
- Confirm calendarEvent.description exists, is active, and is a TEXT-type field supporting displayedMaxRows.
- Reconcile any custom override on the description field, then re-run.
- Rebuild the image if the standard seed for calendarEvent is stale.
Defensive patterns
Strategy: validation
Validate before calling
// Confirm calendarEvent.description is a TEXT-type field supporting displayedMaxRows.
const desc = await dataSource.query(`
SELECT "type" FROM core."fieldMetadata"
WHERE "nameSingular" = 'description'
AND "objectMetadataId" = (SELECT id FROM core."objectMetadata" WHERE "nameSingular" = 'calendarEvent')
`);
if (!desc.length) throw new Error('calendarEvent.description missing');
if (!['TEXT', 'LONG_TEXT', 'RICH_TEXT'].includes(desc[0].type)) {
throw new Error(`description type ${desc[0].type} does not support displayedMaxRows`);
} 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
- Keep the calendarEvent object aligned to the standard seed.
- Avoid manual edits to standard field types or overrides.
- Deploy matching standard seed and command code in one image.
When it happens
Trigger: Running the 2.2 upgrade on a workspace where calendarEvent.description is missing, not a TEXT/long-text type that supports displayedMaxRows, or has an override that conflicts with the update. Also when the field is referenced in a way that locks it from update.
Common situations: Workspace on an older release where description has a different type or custom override; prior partial run; standard seed drift for the calendarEvent object.
Related errors
- Failed to delete CalendarEvent recordingPreference field for
- Failed to create CalendarEvent record page metadata for work
- Migration failed for workspace ${workspaceId} while healing
- Failed to create CallRecording recordingRequestStatus metada
- Failed to persist searchFieldMetadata rows for workspace ${w
AI-assisted analysis of twentyhq/twenty@1f5dd2bbd2 (2026-08-12).
Data as JSON: /api/errors/90d65c86dc20e530.
Report an issue: GitHub.