Skip to content

Commit

Permalink
fix(google-cloud): catch missing Secret on first run
Browse files Browse the repository at this point in the history
in getSecret, if /Secret does not exist, we had an async
error uncaught. Catch it explicitly so that the Secret
will get created.
  • Loading branch information
donbowman committed Nov 14, 2019
1 parent c0d3c63 commit 473303d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plugins/google-cloud/src/data-storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ class GoogleCloudDatabase implements IPluginStorage<VerdaccioConfigGoogleStorage
}
// "{\"secret\":\"181bc38698078f880564be1e4d7ec107ac8a3b344a924c6d86cea4a84a885ae0\"}"
return entities.secret;
}).catch(err => {
this.logger.warn('gcloud: [datastore getSecret] init error');
return Promise.reject(getServiceUnavailable('[getSecret] permissions error'));
});
}

Expand Down

0 comments on commit 473303d

Please sign in to comment.