Skip to content

Commit 286d07c

Browse files
committed
Add missing catch statements in BigQuery samples.
1 parent 92977ab commit 286d07c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

bigquery/queries.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ function queryShakespeare (projectId) {
6565
.then((results) => {
6666
const rows = results[0];
6767
printResult(rows);
68+
})
69+
.catch((err) => {
70+
console.error('ERROR:', err);
6871
});
6972
}
7073
// [END bigquery_simple_app_query]
@@ -97,6 +100,9 @@ function syncQuery (sqlQuery, projectId) {
97100
const rows = results[0];
98101
console.log('Rows:');
99102
rows.forEach((row) => console.log(row));
103+
})
104+
.catch((err) => {
105+
console.error('ERROR:', err);
100106
});
101107
// [END bigquery_sync_query]
102108
}
@@ -138,6 +144,9 @@ function asyncQuery (sqlQuery, projectId) {
138144
const rows = results[0];
139145
console.log('Rows:');
140146
rows.forEach((row) => console.log(row));
147+
})
148+
.catch((err) => {
149+
console.error('ERROR:', err);
141150
});
142151
// [END bigquery_async_query]
143152
}

0 commit comments

Comments
 (0)