Skip to content

Commit e7669c7

Browse files
authoredSep 19, 2022
GCS: ignore insufficient access error (#294)
1 parent eacfcdb commit e7669c7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

‎lib/stores/GCSDataStore.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ class GCSDataStore extends DataStore {
4848
_getBucket() {
4949
const bucket = this.gcs.bucket(this.bucket_name);
5050
bucket.exists((error, exists) => {
51+
// ignore insufficient access error, assume bucket exists
52+
if (error.code === 403) {
53+
return;
54+
}
55+
5156
if (error) {
5257
log(error);
5358
throw new Error(`[GCSDataStore] _getBucket: ${error.message}`);
@@ -56,7 +61,6 @@ class GCSDataStore extends DataStore {
5661
if (!exists) {
5762
throw new Error(`[GCSDataStore] _getBucket: ${this.bucket_name} bucket does not exist`);
5863
}
59-
6064
});
6165

6266
return bucket;

0 commit comments

Comments
 (0)
Please sign in to comment.