Skip to content

Commit 9ecacf8

Browse files
yoshi-automationJustinBeckwith
authored andcommitted
fix: throw on invalid credentials (#281)
1 parent b2af9a9 commit 9ecacf8

15 files changed

Lines changed: 61 additions & 5 deletions

packages/google-cloud-dialogflow/src/v2/agents_client.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,10 @@ class AgentsClient {
231231
function() {
232232
const args = Array.prototype.slice.call(arguments, 0);
233233
return stub[methodName].apply(stub, args);
234+
},
235+
err =>
236+
function() {
237+
throw err;
234238
}
235239
),
236240
defaults[methodName],

packages/google-cloud-dialogflow/src/v2/contexts_client.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,10 @@ class ContextsClient {
172172
function() {
173173
const args = Array.prototype.slice.call(arguments, 0);
174174
return stub[methodName].apply(stub, args);
175+
},
176+
err =>
177+
function() {
178+
throw err;
175179
}
176180
),
177181
defaults[methodName],

packages/google-cloud-dialogflow/src/v2/entity_types_client.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,10 @@ class EntityTypesClient {
273273
function() {
274274
const args = Array.prototype.slice.call(arguments, 0);
275275
return stub[methodName].apply(stub, args);
276+
},
277+
err =>
278+
function() {
279+
throw err;
276280
}
277281
),
278282
defaults[methodName],

packages/google-cloud-dialogflow/src/v2/intents_client.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,10 @@ class IntentsClient {
236236
function() {
237237
const args = Array.prototype.slice.call(arguments, 0);
238238
return stub[methodName].apply(stub, args);
239+
},
240+
err =>
241+
function() {
242+
throw err;
239243
}
240244
),
241245
defaults[methodName],

packages/google-cloud-dialogflow/src/v2/session_entity_types_client.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,10 @@ class SessionEntityTypesClient {
166166
function() {
167167
const args = Array.prototype.slice.call(arguments, 0);
168168
return stub[methodName].apply(stub, args);
169+
},
170+
err =>
171+
function() {
172+
throw err;
169173
}
170174
),
171175
defaults[methodName],

packages/google-cloud-dialogflow/src/v2/sessions_client.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,10 @@ class SessionsClient {
146146
function() {
147147
const args = Array.prototype.slice.call(arguments, 0);
148148
return stub[methodName].apply(stub, args);
149+
},
150+
err =>
151+
function() {
152+
throw err;
149153
}
150154
),
151155
defaults[methodName],

packages/google-cloud-dialogflow/src/v2beta1/agents_client.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,10 @@ class AgentsClient {
232232
function() {
233233
const args = Array.prototype.slice.call(arguments, 0);
234234
return stub[methodName].apply(stub, args);
235+
},
236+
err =>
237+
function() {
238+
throw err;
235239
}
236240
),
237241
defaults[methodName],

packages/google-cloud-dialogflow/src/v2beta1/contexts_client.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,10 @@ class ContextsClient {
178178
function() {
179179
const args = Array.prototype.slice.call(arguments, 0);
180180
return stub[methodName].apply(stub, args);
181+
},
182+
err =>
183+
function() {
184+
throw err;
181185
}
182186
),
183187
defaults[methodName],

packages/google-cloud-dialogflow/src/v2beta1/documents_client.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,10 @@ class DocumentsClient {
200200
function() {
201201
const args = Array.prototype.slice.call(arguments, 0);
202202
return stub[methodName].apply(stub, args);
203+
},
204+
err =>
205+
function() {
206+
throw err;
203207
}
204208
),
205209
defaults[methodName],

packages/google-cloud-dialogflow/src/v2beta1/entity_types_client.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,10 @@ class EntityTypesClient {
273273
function() {
274274
const args = Array.prototype.slice.call(arguments, 0);
275275
return stub[methodName].apply(stub, args);
276+
},
277+
err =>
278+
function() {
279+
throw err;
276280
}
277281
),
278282
defaults[methodName],

0 commit comments

Comments
 (0)