diff --git a/automl/batch_predict.js b/automl/batch_predict.js index be959c236a..e39c2299ba 100644 --- a/automl/batch_predict.js +++ b/automl/batch_predict.js @@ -67,4 +67,8 @@ function main( // [END automl_batch_predict] } +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); main(...process.argv.slice(2)); diff --git a/automl/beta/batch_predict.js b/automl/beta/batch_predict.js index af95de6c82..832ee7c63d 100644 --- a/automl/beta/batch_predict.js +++ b/automl/beta/batch_predict.js @@ -67,4 +67,8 @@ function main( // [END automl_batch_predict_beta] } +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); main(...process.argv.slice(2)); diff --git a/automl/beta/delete-dataset.js b/automl/beta/delete-dataset.js index 4044d61dfb..4aae984f38 100644 --- a/automl/beta/delete-dataset.js +++ b/automl/beta/delete-dataset.js @@ -50,4 +50,8 @@ function main( // [END automl_delete_dataset_beta] } +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); main(...process.argv.slice(2)); diff --git a/automl/beta/delete-model.js b/automl/beta/delete-model.js index e409a7b9b2..0a3d61c420 100644 --- a/automl/beta/delete-model.js +++ b/automl/beta/delete-model.js @@ -47,4 +47,8 @@ function main( // [END automl_delete_model_beta] } +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); main(...process.argv.slice(2)); diff --git a/automl/beta/get-model-evaluation.js b/automl/beta/get-model-evaluation.js index 1081cbab01..8ab4dac4c5 100644 --- a/automl/beta/get-model-evaluation.js +++ b/automl/beta/get-model-evaluation.js @@ -57,6 +57,7 @@ function main( console.log(`\tnanos ${response.createTime.nanos / 1e9}`); console.log(`Evaluation example count: ${response.evaluatedExampleCount}`); // [END automl_video_object_tracking_get_model_evaluation_beta] + // [END automl_video_classification_get_model_evaluation_beta] // [START automl_video_classification_get_model_evaluation_beta] console.log( @@ -77,4 +78,8 @@ function main( // [END automl_video_object_tracking_get_model_evaluation_beta] } +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); main(...process.argv.slice(2)); diff --git a/automl/beta/get-model.js b/automl/beta/get-model.js index d78cc930d1..16583398da 100644 --- a/automl/beta/get-model.js +++ b/automl/beta/get-model.js @@ -58,4 +58,8 @@ function main( // [END automl_get_model_beta] } +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); main(...process.argv.slice(2)); diff --git a/automl/beta/get-operation-status.js b/automl/beta/get-operation-status.js index 1d47396aeb..d11ec2506c 100644 --- a/automl/beta/get-operation-status.js +++ b/automl/beta/get-operation-status.js @@ -50,4 +50,8 @@ function main( // [END automl_get_operation_status_beta] } +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); main(...process.argv.slice(2)); diff --git a/automl/beta/import-dataset.js b/automl/beta/import-dataset.js index 54f41ea082..37d7651214 100644 --- a/automl/beta/import-dataset.js +++ b/automl/beta/import-dataset.js @@ -59,4 +59,8 @@ function main( // [END automl_import_dataset_beta] } +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); main(...process.argv.slice(2)); diff --git a/automl/beta/list-datasets.js b/automl/beta/list-datasets.js index 2c0c5758d4..4668638102 100644 --- a/automl/beta/list-datasets.js +++ b/automl/beta/list-datasets.js @@ -70,4 +70,8 @@ function main(projectId = 'YOUR_PROJECT_ID', location = 'us-central1') { // [END automl_video_object_tracking_list_datasets_beta] } +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); main(...process.argv.slice(2)); diff --git a/automl/beta/list-models.js b/automl/beta/list-models.js index 2f3ff570f3..9f392acdfa 100644 --- a/automl/beta/list-models.js +++ b/automl/beta/list-models.js @@ -54,4 +54,8 @@ function main(projectId = 'YOUR_PROJECT_ID', location = 'us-central1') { // [END automl_list_models_beta] } +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); main(...process.argv.slice(2)); diff --git a/automl/beta/video-classification-create-dataset.js b/automl/beta/video-classification-create-dataset.js index 55a5c1b670..d345c8209c 100644 --- a/automl/beta/video-classification-create-dataset.js +++ b/automl/beta/video-classification-create-dataset.js @@ -59,4 +59,8 @@ function main( // [END automl_video_classification_create_dataset_beta] } +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); main(...process.argv.slice(2)); diff --git a/automl/beta/video-classification-create-model.js b/automl/beta/video-classification-create-model.js index 71e378fb46..ca7c1eb04c 100644 --- a/automl/beta/video-classification-create-model.js +++ b/automl/beta/video-classification-create-model.js @@ -56,4 +56,8 @@ function main( // [END automl_video_classification_create_model_beta] } +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); main(...process.argv.slice(2)); diff --git a/automl/beta/video-object-tracking-create-dataset.js b/automl/beta/video-object-tracking-create-dataset.js index 9ecf0f375a..561e65fe77 100644 --- a/automl/beta/video-object-tracking-create-dataset.js +++ b/automl/beta/video-object-tracking-create-dataset.js @@ -59,4 +59,8 @@ function main( // [END automl_video_object_tracking_create_dataset_beta] } +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); main(...process.argv.slice(2)); diff --git a/automl/beta/video-object-tracking-create-model.js b/automl/beta/video-object-tracking-create-model.js index 2131034bb1..7a93864d73 100644 --- a/automl/beta/video-object-tracking-create-model.js +++ b/automl/beta/video-object-tracking-create-model.js @@ -56,4 +56,8 @@ function main( // [END automl_video_object_tracking_create_model_beta] } +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); main(...process.argv.slice(2)); diff --git a/automl/delete_dataset.js b/automl/delete_dataset.js index 98d55cb7ec..ef882e524a 100644 --- a/automl/delete_dataset.js +++ b/automl/delete_dataset.js @@ -50,4 +50,8 @@ function main( // [END automl_delete_dataset] } +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); main(...process.argv.slice(2)); diff --git a/automl/delete_model.js b/automl/delete_model.js index a5e921275c..686d662190 100644 --- a/automl/delete_model.js +++ b/automl/delete_model.js @@ -47,4 +47,8 @@ function main( // [END automl_delete_model] } +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); main(...process.argv.slice(2)); diff --git a/automl/deploy_model.js b/automl/deploy_model.js index 3f3b3c53fb..b51c43f5f5 100644 --- a/automl/deploy_model.js +++ b/automl/deploy_model.js @@ -50,4 +50,8 @@ function main( // [END automl_deploy_model] } +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); main(...process.argv.slice(2)); diff --git a/automl/export_dataset.js b/automl/export_dataset.js index cc89fd586e..89f8710d28 100644 --- a/automl/export_dataset.js +++ b/automl/export_dataset.js @@ -56,4 +56,8 @@ function main( // [END automl_export_dataset] } +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); main(...process.argv.slice(2)); diff --git a/automl/get_dataset.js b/automl/get_dataset.js index e5be41ee4f..8cee268630 100644 --- a/automl/get_dataset.js +++ b/automl/get_dataset.js @@ -94,4 +94,8 @@ function main( // [END automl_vision_object_detection_get_dataset] } +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); main(...process.argv.slice(2)); diff --git a/automl/get_model.js b/automl/get_model.js index 477f627aa3..1ebc265c09 100644 --- a/automl/get_model.js +++ b/automl/get_model.js @@ -58,4 +58,8 @@ function main( // [END automl_get_model] } +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); main(...process.argv.slice(2)); diff --git a/automl/get_model_evaluation.js b/automl/get_model_evaluation.js index aefb03bf44..724c6cf224 100644 --- a/automl/get_model_evaluation.js +++ b/automl/get_model_evaluation.js @@ -110,4 +110,8 @@ function main( // [END automl_vision_object_detection_get_model_evaluation] } +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); main(...process.argv.slice(2)); diff --git a/automl/get_operation_status.js b/automl/get_operation_status.js index bd6f3c5538..a503550e90 100644 --- a/automl/get_operation_status.js +++ b/automl/get_operation_status.js @@ -50,4 +50,8 @@ function main( // [END automl_get_operation_status] } +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); main(...process.argv.slice(2)); diff --git a/automl/import_dataset.js b/automl/import_dataset.js index fe4bdb14f7..72815f68b7 100644 --- a/automl/import_dataset.js +++ b/automl/import_dataset.js @@ -59,4 +59,8 @@ function main( // [END automl_import_dataset] } +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); main(...process.argv.slice(2)); diff --git a/automl/language_entity_extraction_create_dataset.js b/automl/language_entity_extraction_create_dataset.js index b5fd37658e..ba31bee259 100644 --- a/automl/language_entity_extraction_create_dataset.js +++ b/automl/language_entity_extraction_create_dataset.js @@ -62,4 +62,8 @@ function main( // [END automl_language_entity_extraction_create_dataset] } +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); main(...process.argv.slice(2)); diff --git a/automl/language_entity_extraction_create_model.js b/automl/language_entity_extraction_create_model.js index 0f6c5bd5c0..53b4dea68d 100644 --- a/automl/language_entity_extraction_create_model.js +++ b/automl/language_entity_extraction_create_model.js @@ -56,4 +56,8 @@ function main( // [END automl_language_entity_extraction_create_model] } +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); main(...process.argv.slice(2)); diff --git a/automl/language_entity_extraction_predict.js b/automl/language_entity_extraction_predict.js index f5c6c7d4f9..f98b8a2010 100644 --- a/automl/language_entity_extraction_predict.js +++ b/automl/language_entity_extraction_predict.js @@ -65,4 +65,8 @@ function main( // [END automl_language_entity_extraction_predict] } +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); main(...process.argv.slice(2)); diff --git a/automl/language_sentiment_analysis_create_dataset.js b/automl/language_sentiment_analysis_create_dataset.js index d146d4e12e..8f406b5c71 100644 --- a/automl/language_sentiment_analysis_create_dataset.js +++ b/automl/language_sentiment_analysis_create_dataset.js @@ -64,4 +64,8 @@ function main( // [END automl_language_sentiment_analysis_create_dataset] } +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); main(...process.argv.slice(2)); diff --git a/automl/language_sentiment_analysis_create_model.js b/automl/language_sentiment_analysis_create_model.js index dff8107d3b..76f559ab0c 100644 --- a/automl/language_sentiment_analysis_create_model.js +++ b/automl/language_sentiment_analysis_create_model.js @@ -56,4 +56,8 @@ function main( // [END automl_language_sentiment_analysis_create_model] } +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); main(...process.argv.slice(2)); diff --git a/automl/language_sentiment_analysis_predict.js b/automl/language_sentiment_analysis_predict.js index a20b761653..44d8a20959 100644 --- a/automl/language_sentiment_analysis_predict.js +++ b/automl/language_sentiment_analysis_predict.js @@ -61,4 +61,8 @@ function main( // [END automl_language_sentiment_analysis_predict] } +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); main(...process.argv.slice(2)); diff --git a/automl/language_text_classification_create_dataset.js b/automl/language_text_classification_create_dataset.js index bd68f1a955..afe3ffdb74 100644 --- a/automl/language_text_classification_create_dataset.js +++ b/automl/language_text_classification_create_dataset.js @@ -64,4 +64,8 @@ function main( // [END automl_language_text_classification_create_dataset] } +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); main(...process.argv.slice(2)); diff --git a/automl/language_text_classification_create_model.js b/automl/language_text_classification_create_model.js index 2a80814367..8292e2ebaa 100644 --- a/automl/language_text_classification_create_model.js +++ b/automl/language_text_classification_create_model.js @@ -56,4 +56,8 @@ function main( // [END automl_language_text_classification_create_model] } +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); main(...process.argv.slice(2)); diff --git a/automl/language_text_classification_predict.js b/automl/language_text_classification_predict.js index ab680e9781..1e7b77b876 100644 --- a/automl/language_text_classification_predict.js +++ b/automl/language_text_classification_predict.js @@ -61,4 +61,8 @@ function main( // [END automl_language_text_classification_predict] } +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); main(...process.argv.slice(2)); diff --git a/automl/list_datasets.js b/automl/list_datasets.js index be9bbdf440..555d823093 100644 --- a/automl/list_datasets.js +++ b/automl/list_datasets.js @@ -105,4 +105,8 @@ function main(projectId = 'YOUR_PROJECT_ID', location = 'us-central1') { // [END automl_vision_object_detection_list_datasets] } +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); main(...process.argv.slice(2)); diff --git a/automl/list_model_evaluations.js b/automl/list_model_evaluations.js index ca9d248b08..d8cd6bb070 100644 --- a/automl/list_model_evaluations.js +++ b/automl/list_model_evaluations.js @@ -109,4 +109,8 @@ function main( // [END automl_vision_object_detection_list_model_evaluations] } +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); main(...process.argv.slice(2)); diff --git a/automl/list_models.js b/automl/list_models.js index 0fe0ac219e..1a6a4600ea 100644 --- a/automl/list_models.js +++ b/automl/list_models.js @@ -54,4 +54,8 @@ function main(projectId = 'YOUR_PROJECT_ID', location = 'us-central1') { // [END automl_list_models] } +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); main(...process.argv.slice(2)); diff --git a/automl/list_operation_status.js b/automl/list_operation_status.js index 49c98effd0..9d1630d2a6 100644 --- a/automl/list_operation_status.js +++ b/automl/list_operation_status.js @@ -49,4 +49,8 @@ function main(projectId = 'YOUR_PROJECT_ID', location = 'us-central1') { // [END automl_list_operation_status] } +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); main(...process.argv.slice(2)); diff --git a/automl/translate_create_dataset.js b/automl/translate_create_dataset.js index 53695ad89e..b4be3e624d 100644 --- a/automl/translate_create_dataset.js +++ b/automl/translate_create_dataset.js @@ -65,4 +65,8 @@ function main( // [END automl_translate_create_dataset] } +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); main(...process.argv.slice(2)); diff --git a/automl/translate_create_model.js b/automl/translate_create_model.js index 550df01aea..a4bf34546e 100644 --- a/automl/translate_create_model.js +++ b/automl/translate_create_model.js @@ -56,4 +56,8 @@ function main( // [END automl_translate_create_model] } +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); main(...process.argv.slice(2)); diff --git a/automl/translate_predict.js b/automl/translate_predict.js index 7e69d2c4c3..cbdcfb127b 100644 --- a/automl/translate_predict.js +++ b/automl/translate_predict.js @@ -62,4 +62,8 @@ function main( // [END automl_translate_predict] } +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); main(...process.argv.slice(2)); diff --git a/automl/undeploy_model.js b/automl/undeploy_model.js index 1ac93035c9..35ac978189 100644 --- a/automl/undeploy_model.js +++ b/automl/undeploy_model.js @@ -50,4 +50,8 @@ function main( // [END automl_undeploy_model] } +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); main(...process.argv.slice(2)); diff --git a/automl/vision_classification_create_dataset.js b/automl/vision_classification_create_dataset.js index ed63a2800e..b2e8184bbb 100644 --- a/automl/vision_classification_create_dataset.js +++ b/automl/vision_classification_create_dataset.js @@ -68,4 +68,8 @@ function main( // [END automl_vision_classification_create_dataset] } +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); main(...process.argv.slice(2)); diff --git a/automl/vision_classification_create_model.js b/automl/vision_classification_create_model.js index 1c2e3558a9..fefa29648c 100644 --- a/automl/vision_classification_create_model.js +++ b/automl/vision_classification_create_model.js @@ -58,4 +58,8 @@ function main( // [END automl_vision_classification_create_model] } +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); main(...process.argv.slice(2)); diff --git a/automl/vision_classification_deploy_model_node_count.js b/automl/vision_classification_deploy_model_node_count.js index d9844d2cce..80971ba1e6 100644 --- a/automl/vision_classification_deploy_model_node_count.js +++ b/automl/vision_classification_deploy_model_node_count.js @@ -53,4 +53,8 @@ function main( // [END automl_vision_classification_deploy_model_node_count] } +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); main(...process.argv.slice(2)); diff --git a/automl/vision_classification_predict.js b/automl/vision_classification_predict.js index 9e34c0822f..a46fac2591 100644 --- a/automl/vision_classification_predict.js +++ b/automl/vision_classification_predict.js @@ -66,4 +66,8 @@ function main( // [END automl_vision_classification_predict] } +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); main(...process.argv.slice(2)); diff --git a/automl/vision_object_detection_create_dataset.js b/automl/vision_object_detection_create_dataset.js index 88fefca123..bfa74cff13 100644 --- a/automl/vision_object_detection_create_dataset.js +++ b/automl/vision_object_detection_create_dataset.js @@ -62,4 +62,8 @@ function main( // [END automl_vision_object_detection_create_dataset] } +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); main(...process.argv.slice(2)); diff --git a/automl/vision_object_detection_create_model.js b/automl/vision_object_detection_create_model.js index 1530483979..ef8922c177 100644 --- a/automl/vision_object_detection_create_model.js +++ b/automl/vision_object_detection_create_model.js @@ -56,4 +56,8 @@ function main( // [END automl_vision_object_detection_create_model] } +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); main(...process.argv.slice(2)); diff --git a/automl/vision_object_detection_deploy_model_node_count.js b/automl/vision_object_detection_deploy_model_node_count.js index 9b774e59db..90fb1d66b5 100644 --- a/automl/vision_object_detection_deploy_model_node_count.js +++ b/automl/vision_object_detection_deploy_model_node_count.js @@ -53,4 +53,8 @@ function main( // [END automl_vision_object_detection_deploy_model_node_count] } +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); main(...process.argv.slice(2)); diff --git a/automl/vision_object_detection_predict.js b/automl/vision_object_detection_predict.js index 528dd817c0..dcf24a726d 100644 --- a/automl/vision_object_detection_predict.js +++ b/automl/vision_object_detection_predict.js @@ -74,4 +74,8 @@ function main( // [END automl_vision_object_detection_predict] } +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); main(...process.argv.slice(2));