diff --git a/packages/contentstack-migration/src/utils/error-helper.js b/packages/contentstack-migration/src/utils/error-helper.js index 86184b0c03..f1048eb743 100644 --- a/packages/contentstack-migration/src/utils/error-helper.js +++ b/packages/contentstack-migration/src/utils/error-helper.js @@ -51,7 +51,7 @@ module.exports = (errors) => { messages.push(`${fileErrorsMessage}${errorMessages}`); } - if (isEmpty(messages) && errors?.length) { + if (isEmpty(messages) && errors !== undefined && isEmpty(errorsByFile)) { console.error('Migration error---', errors); } else { console.log(messages.join('\n'));