Skip to content

Commit ae3f476

Browse files
Merge pull request #464 from shaurabh-tiwari-git/customLabelErrorMessageFix
@W-20632832 - Custom label error message fix
2 parents a13f409 + c9ccae4 commit ae3f476

File tree

4 files changed

+6
-1
lines changed

4 files changed

+6
-1
lines changed

messages/migrate.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@
232232
"startingCustomLabelMigration": "Starting Custom Labels migration",
233233
"customLabelMigrationCompleted": "Custom Labels migration completed. %s labels processed out of %s total",
234234
"errorDuringCustomLabelMigration": "Error during Custom Labels migration: %s",
235+
"customLabelMigrationErrorMessage": "We couldn’t complete the Custom Labels migration. Check your org configuration and confirm it meets the requirements outlined <a href='https://help.salesforce.com/s/articleView?id=xcloud.os_migrate_oma_prereq.htm&type=5' target='_blank'>here</a>.",
235236
"callingCloneCustomLabelsAPI": "Calling clone-custom-labels API for namespace: %s",
236237
"cloneCustomLabelsAPIResponse": "Clone custom labels API response summary: %s results",
237238
"errorCallingCloneCustomLabelsAPI": "Error calling clone-custom-labels API: %s",

src/migration/customLabels.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ export class CustomLabelsMigrationTool extends BaseMigrationTool implements Migr
166166
name: this.getName(),
167167
results: emptyMap,
168168
records: emptyMap, // Both point to the same empty map
169-
errors: [String(error)],
169+
errors: [this.messages.getMessage('customLabelMigrationErrorMessage')],
170170
},
171171
];
172172
}

src/utils/constants/documentRegistry.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,6 @@ export const documentRegistry = {
2929
'https://help.salesforce.com/s/articleView?id=xcloud.os_omnistudio_naming_conventions.htm&type=5',
3030
manualDeploymentSteps:
3131
'https://help.salesforce.com/s/articleView?id=xcloud.os_standard_set_up_your_environment_for_customizing_omniscript_elements.htm&type=5',
32+
customLabelMigrationErrorMessage:
33+
'https://help.salesforce.com/s/articleView?id=xcloud.os_migrate_oma_prereq.htm&type=5',
3234
};

test/utils/constants/documentRegistry.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ const titles = {
4141
duplicateCardNameMessage: 'Clone a Flexcard',
4242
reservedKeysFoundInPropertySet: 'Omnistudio Naming Conventions',
4343
manualDeploymentSteps: 'Set Up Your Environment to Customize Omniscript Elements',
44+
customLabelMigrationErrorMessage: 'Omnistudio Migration Prerequisites',
4445
};
4546

4647
describe('DocumentRegistry', () => {
@@ -126,6 +127,7 @@ describe('DocumentRegistry', () => {
126127
'duplicateCardNameMessage',
127128
'reservedKeysFoundInPropertySet',
128129
'manualDeploymentSteps',
130+
'customLabelMigrationErrorMessage',
129131
];
130132

131133
expectedKeys.forEach((key) => {

0 commit comments

Comments
 (0)