Skip to content
This repository was archived by the owner on Dec 11, 2022. It is now read-only.

Commit c2877ec

Browse files
authored
Merge pull request #68 from doitintl/issue-65
Add a check for jobUser permissions #65
2 parents 4e27904 + a3f687e commit c2877ec

File tree

3 files changed

+54351
-23
lines changed

3 files changed

+54351
-23
lines changed

dist/module.js

Lines changed: 54336 additions & 22 deletions
Large diffs are not rendered by default.

dist/module.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/datasource.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,20 @@ export class BigQueryDatasource {
262262
} catch (error) {
263263
message = error.statusText ? error.statusText : defaultErrorMessage;
264264
}
265+
try {
266+
const path = `v2/projects/${this.projectName}/jobs/no-such-jobs`;
267+
const response = await this.doRequest(`${this.baseUrl}${path}`);
268+
if (response.status !== 200) {
269+
status = "error";
270+
message = response.statusText
271+
? response.statusText
272+
: defaultErrorMessage;
273+
}
274+
} catch (error) {
275+
if (error.status !== 404) {
276+
message = error.statusText ? error.statusText : defaultErrorMessage;
277+
}
278+
}
265279
return {
266280
message,
267281
status

0 commit comments

Comments
 (0)