Nodejs-pubsub: Subscriber/Subscription.close does not support promises

Created on 13 Aug 2018  路  3Comments  路  Source: googleapis/nodejs-pubsub

Environment details

  • OS: Linux
  • Node.js version: 7.5.0
  • npm version: 6.3.0
  • @google-cloud/pubsub version: 0.19.0

Steps to reproduce

  1. Call subscription.close() without a callback argument
  2. Expect to receive a promise per documentation
  3. No promise is returned

UTSL: The code for the Subscription class calls promisifyAll on its members, but Subscriber, where close is implemented, does not, and so close doesn't actually adhere to its JSdoc.

pubsub triage me bug

Most helpful comment

What's "UTSL"?

Use The Source, Luke!

All 3 comments

Thanks for reporting!

@callmehiphop - I can't find this method in the public-facing docs. Is this intended to be a public method?

P.S. What's "UTSL"?

What's "UTSL"?

Use The Source, Luke!

@stephenplusplus it is, I think when I moved the Subscriber code into a separate class it got lost. So my take away is that we need to promisify the Subscriber object and include a JSDoc tag to make close (and any other public method) show up on the docs.

Was this page helpful?
0 / 5 - 0 ratings