[document-updater] fix error handling in scripts GitOrigin-RevId: d80506e0e42ffce70e9eb3571e02bea274f7a263
@@ -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)
@@ -94,9 +94,7 @@ clientPromise.then(client => {