-
Notifications
You must be signed in to change notification settings - Fork 653
Closed
Labels
api: pubsubIssues related to the Pub/Sub API.Issues related to the Pub/Sub API.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
Hello,
I use the lib with promises instead of callbacks and when I publish a message I expect to get the messageId as a string, however I get an array containing the string: ['some-id']. Since the documentation seems to say otherwise, I assume it's a bug
It works correctly when I use it with a callback.
Environment details
- OS: MacOS
- Node.js version: 8.5
- google-cloud-node version: 0.14.5
Steps to reproduce
- require
google-cloud
const buffer = new Buffer(JSON.stringify(message));
const r = await this.pubsub.topic(topicName).publisher().publish(buffer)[0];
console.log('messageId', r);
Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
api: pubsubIssues related to the Pub/Sub API.Issues related to the Pub/Sub API.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.