The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
fix(server): surface validation errors in 2-14 fix-standard-relation-field-labels-icons upgrade command (#21658)
Charles Bochetee6c9db33a56
diff --git a/packages/twenty-server/src/database/commands/upgrade-version-command/2-14/2-14-workspace-command-1799000040000-fix-standard-relation-field-labels-icons.command.ts b/packages/twenty-server/src/database/commands/upgrade-version-command/2-14/2-14-workspace-command-1799000040000-fix-standard-relation-field-labels-icons.command.tsindex 8eaed28eb7f..6a4dc762329 100644--- a/packages/twenty-server/src/database/commands/upgrade-version-command/2-14/2-14-workspace-command-1799000040000-fix-standard-relation-field-labels-icons.command.ts+++ b/packages/twenty-server/src/database/commands/upgrade-version-command/2-14/2-14-workspace-command-1799000040000-fix-standard-relation-field-labels-icons.command.ts@@ -136,8 +136,23 @@ export class FixStandardRelationFieldLabelsIconsCommand extends ActiveOrSuspende);if (result.status === 'fail') {+ const failureDetails = Object.values(result.report)+ .flat()+ .map((failedValidation) => {+ const errorMessages = failedValidation.errors+ .map((error) => `${error.code}: ${error.message}`)+ .join('; ');++ return `[${failedValidation.metadataName}] ${failedValidation.flatEntityMinimalInformation.universalIdentifier ?? failedValidation.flatEntityMinimalInformation.id ?? 'unknown'} -> ${errorMessages}`;+ })+ .join('\n');++ this.logger.error(+ `Migration build failed for workspace ${workspaceId} while healing standard relation field labels/icons:\n${failureDetails}`,+ );+throw new Error(- `Migration failed for workspace ${workspaceId} while healing standard relation field labels/icons`,+ `Migration failed for workspace ${workspaceId} while healing standard relation field labels/icons:\n${failureDetails}`,);}