diff --git a/services/document-updater/scripts/fix_docs_with_empty_pathnames.js b/services/document-updater/scripts/fix_docs_with_empty_pathnames.js index c11af34375..abbfb01ba7 100644 --- a/services/document-updater/scripts/fix_docs_with_empty_pathnames.js +++ b/services/document-updater/scripts/fix_docs_with_empty_pathnames.js @@ -74,8 +74,6 @@ cleanUpDocs({ limit: 1000, dryRun: process.env.DRY_RUN !== 'false' }) console.log('DONE') }) .catch(function (error) { - if (error) { - throw error - } - return process.exit() + console.error(error) + process.exit(1) }) diff --git a/services/document-updater/scripts/fix_docs_with_missing_project.js b/services/document-updater/scripts/fix_docs_with_missing_project.js index c88e71cb01..1830c41057 100644 --- a/services/document-updater/scripts/fix_docs_with_missing_project.js +++ b/services/document-updater/scripts/fix_docs_with_missing_project.js @@ -94,9 +94,7 @@ clientPromise.then(client => { console.log('DONE') }) .catch(function (error) { - if (error) { - throw error - } - return process.exit() + console.error(error) + process.exit(1) }) })