-
Notifications
You must be signed in to change notification settings - Fork 390
Closed
Labels
api: storageIssues related to the googleapis/nodejs-storage API.Issues related to the googleapis/nodejs-storage API.needs more infoThis issue needs more information from the customer to proceed.This issue needs more information from the customer to proceed.status: investigatingThe issue is under investigation, which is determined to be non-trivial.The issue is under investigation, which is determined to be non-trivial.type: questionRequest for information or clarification. Not an issue.Request for information or clarification. Not an issue.
Description
In 1.7, you would get an error if the credentials are invalid. Now the getBuckets() promise is resolved and it looks like you have no buckets. Is that behavior intended? I can't find it anywhere in the docs.
const Storage = require('@google-cloud/storage');
// Invalid credentials
const storage = new Storage({
keyFilename: '/Users/foo.json'
});
// Makes an authenticated API request.
storage
.getBuckets()
.then((results) => {
const buckets = results[0];
console.log('Buckets:');
buckets.forEach((bucket) => {
console.log(bucket.name);
});
})
.catch((err) => {
console.error('ERROR:', err);
console.log('such error');
});
Metadata
Metadata
Assignees
Labels
api: storageIssues related to the googleapis/nodejs-storage API.Issues related to the googleapis/nodejs-storage API.needs more infoThis issue needs more information from the customer to proceed.This issue needs more information from the customer to proceed.status: investigatingThe issue is under investigation, which is determined to be non-trivial.The issue is under investigation, which is determined to be non-trivial.type: questionRequest for information or clarification. Not an issue.Request for information or clarification. Not an issue.