tisonkun opened a new issue, #312:
URL: https://github.com/apache/pulsar-client-node/issues/312

   I change the timeout settings in `examples/produce.js` to 1 second, and run 
it without a running Pulsar server. The program failed due to timeout, but the 
error message is incomprehensible:
   
   ```
   $ git --no-pager diff            
   diff --git a/examples/producer.js b/examples/producer.js
   index b859a17..e1e3c46 100644
   --- a/examples/producer.js
   +++ b/examples/producer.js
   @@ -23,13 +23,13 @@ const Pulsar = require('../');
      // Create a client
      const client = new Pulsar.Client({
        serviceUrl: 'pulsar://localhost:6650',
   -    operationTimeoutSeconds: 30,
   +    operationTimeoutSeconds: 1,
      });
    
      // Create a producer
      const producer = await client.createProducer({
        topic: 'persistent://public/default/my-topic',
   -    sendTimeoutMs: 30000,
   +    sendTimeoutMs: 1000,
        batchingEnabled: true,
      });
    
   $ node examples/producer
   node:internal/process/promises:289
               triggerUncaughtException(err, true /* fromPromise */);
               ^
   
   [Error: Failed to create producer: TimeOut]
   
   Node.js v19.8.1
   
   ```
   
   I'm wondering if we can throw a clear exception on this case.
   
   cc @BewareMyPower @RobertIndie @shibd 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to