mpromise icon indicating copy to clipboard operation
mpromise copied to clipboard

feature request: add #catch()

Open stephenmathieson opened this issue 10 years ago • 10 comments

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/catch

stephenmathieson avatar Dec 18 '14 23:12 stephenmathieson

:+1:

oppenlander avatar Apr 08 '15 21:04 oppenlander

+1

tamtakoe avatar Apr 27 '15 08:04 tamtakoe

+1

Jokero avatar Apr 27 '15 08:04 Jokero

+1

kbjr avatar May 25 '15 01:05 kbjr

:+1:

amitport avatar May 29 '15 19:05 amitport

+1

heycalmdown avatar Jun 02 '15 05:06 heycalmdown

+1

hustKiwi avatar Jun 03 '15 14:06 hustKiwi

+1, would you accept a PR for this?

jonjaques avatar Jun 12 '15 19:06 jonjaques

For anyone still running into this issue, here's a related issue and workaround.

Basically you can just add catch to Mpromise directly when you initialize your db connection:

var mpromise = require('mongoose/node_modules/mpromise');

mpromise.prototype.catch = function(onReject) {
  return this.then(undefined, onReject);
};

iansinnott avatar Aug 01 '15 23:08 iansinnott

Hello all, For now we have .end()

refack avatar Aug 15 '15 22:08 refack