You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get the following unhandled promise rejection warning:
[ClientConnection:469] [<none> -> pulsar://this-will-fail:6650] Resolve error: asio.netdb:1 : Host not found (authoritative)
(node:15) UnhandledPromiseRejectionWarning: Error: Failed to create producer: ConnectError
(node:15) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:15) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
I did some quick checking into using Promises with AsyncWorker and there is a proposed solution mentioned here on the NAPI repository: nodejs/node-addon-api#231 (comment)
I'd be willing to incorporate this solution and create a pull request, if it would be welcome, but I wanted to discuss it here first before making any changes.
I'd also be willing to help out with some of the other requests here, as well.
I'll be using this in production going forward.
The text was updated successfully, but these errors were encountered:
Original Issue: apache#119
When creating a producer using a client URL that is intentionally incorrect via the following:
I get the following unhandled promise rejection warning:
Upon further inspection of the code the error originates from the following line:
https://github.com/apache/pulsar-client-node/blob/eaba0dcd9b8e04fe7c23feb0c0ec6e424a817f64/src/Consumer.cc#L134
Where
ConsumerNewInstanceWorker
is aNapi::AsyncWorker
:https://github.com/apache/pulsar-client-node/blob/eaba0dcd9b8e04fe7c23feb0c0ec6e424a817f64/src/Consumer.cc#L94-L102
I did some quick checking into using Promises with
AsyncWorker
and there is a proposed solution mentioned here on the NAPI repository: nodejs/node-addon-api#231 (comment)I'd be willing to incorporate this solution and create a pull request, if it would be welcome, but I wanted to discuss it here first before making any changes.
I'd also be willing to help out with some of the other requests here, as well.
I'll be using this in production going forward.
The text was updated successfully, but these errors were encountered: