Skip to content Skip to sidebar Skip to footer
Showing posts with the label Bluebird

Can I Break A Chain Early With Bluebird Promises?

I don't necessarily want to error, but I have: getFromDb().then (tradeData) -> if not trad… Read more Can I Break A Chain Early With Bluebird Promises?

Testing Rejected Promise In Mocha/chai

I have a class that rejects a promise: Sync.prototype.doCall = function(verb, method, data) { var… Read more Testing Rejected Promise In Mocha/chai

How To Wait For The Return Of A Mongoose Search?

I created a CRUD with NodeJS / Mongoose, split the files in MVC style. In route example I show up b… Read more How To Wait For The Return Of A Mongoose Search?

How Do I Know Which Handlers Throw Error In Promise?

Suppose I have a promise as following: p.then(Task1) .then(Task2) .then(Task3) .catch(errorHandl… Read more How Do I Know Which Handlers Throw Error In Promise?

Sequential Execution Of Promise

I have following promise functions implemented like return new Promise(function(resolve, reject) { … Read more Sequential Execution Of Promise

Poll For A Result N Times (with Delays Between Attempts) Before Failing

We need to write a Node.js function that polls a certain API endpoint for a result of a previously … Read more Poll For A Result N Times (with Delays Between Attempts) Before Failing

Combining Promises And Chaining

Is there a good design pattern for utilizing promises, while still supporting chaining? For example… Read more Combining Promises And Chaining

A Promise Was Created In A Handler But Was Not Returned From It

I've just started using bluebird promises and am getting a confusing error Code Abstract var … Read more A Promise Was Created In A Handler But Was Not Returned From It