question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BlueBird exceptions

See original GitHub issue

Hello, for some reason BlueBird throws handled exceptions when RequestError: Error: ESOCKETTIMEDOUT happens. In bluebird\js\release\util.js line 16 it throws for this execution: return target.apply(this, arguments);

That’s the full stack trace I get when this happens:

6:07:25 PM - error: RequestError: Error: ESOCKETTIMEDOUT at new RequestError (c:\Users\h9pe\Documents\projectname.io-express\node_modules\request-promise-core\lib\errors.js:14:15) at Request.module.exports.plumbing.callback (c:\Users\h9pe\Documents\projectname.io-express\node_modules\request-promise-core\lib\plumbing.js:87:29) at Request.RP$callback [as _callback] (c:\Users\h9pe\Documents\projectname.io-express\node_modules\request-promise-core\lib\plumbing.js:46:31) at Request.init.self.callback (c:\Users\h9pe\Documents\projectname.io-express\node_modules\request\request.js:188:22) at emitOne (events.js:96:13) at Request.emit (events.js:188:7) at ClientRequest.<anonymous> (c:\Users\h9pe\Documents\projectname.io-express\node_modules\request\request.js:822:16) at ClientRequest.g (events.js:291:16) at emitNone (events.js:86:13) at ClientRequest.emit (events.js:185:7) at Socket.emitTimeout (_http_client.js:629:10) at Socket.g (events.js:291:16) at emitNone (events.js:86:13) at Socket.emit (events.js:185:7) at Socket._onTimeout (net.js:342:8) at ontimeout (timers.js:380:14) at tryOnTimeout (timers.js:244:5) at Timer.listOnTimeout (timers.js:214:5)

I am using bluebird 3.5.0 and request-promise 4.2.1. What am I doing wrong / what is the issue?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
analog-nicocommented, Aug 4, 2017

The code looks perfect. You do many parallel requests so that is probably the reason why you get a ESOCKETTIMEDOUT in the first place.

Wait a moment. Why are you wondering about the error passing through util.js? Isn’t the error correctly passed down to your catch handler and you get the “Error during upsert leaderboard task” output?!

P.S.: True, the code is complex but this is how you do it with promises. However, if you use node v6 and up you should look into Bluebird.coroutine(function *() { ... }). It’s a game changer!

0reactions
jaimepokhoycommented, May 10, 2018

@weeco i see… just noticed i was doing some risky REST requests, thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

.catch | bluebird
Bluebird is a fully featured JavaScript promises library with unmatched ... Promise exception handling mirrors native exception handling in JavaScript.
Read more >
Asynchronous exception handling with bluebird promises
Promises are not domains, they will not catch exceptions from asynchronous callbacks. You just can't do that. Promises do however catch ...
Read more >
Member Agreement - Bluebird
Coverage is determined by the terms, conditions, and exclusions of the Policies applicable to your Card and is subject to change with notice....
Read more >
Bluebirds & Their Enemies - Ohio Bluebird Society
Life for any wild animal can be challenging, and bluebirds are no exception. They face a range of enemies, each with different risks...
Read more >
Wildlife Exemption Blue Bird Box Management Plans
Wildlife Exemption Blue Bird Box Management Plans ... In general, land can be managed for many different wildlife species under the wildlife tax...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found