Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: add #catch() #15

Open
stephenmathieson opened this issue Dec 18, 2014 · 10 comments · May be fixed by #17
Open

feature request: add #catch() #15

stephenmathieson opened this issue Dec 18, 2014 · 10 comments · May be fixed by #17

Comments

@stephenmathieson
Copy link

@stephenmathieson stephenmathieson commented Dec 18, 2014

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

@stephenmathieson stephenmathieson changed the title fea feature request: add #catch() Dec 18, 2014
@oppenlander
Copy link

@oppenlander oppenlander commented Apr 8, 2015

👍

6 similar comments
@tamtakoe
Copy link

@tamtakoe tamtakoe commented Apr 27, 2015

+1

@Jokero
Copy link

@Jokero Jokero commented Apr 27, 2015

+1

@kbjr
Copy link

@kbjr kbjr commented May 25, 2015

+1

@amitport
Copy link

@amitport amitport commented May 29, 2015

👍

@heycalmdown
Copy link

@heycalmdown heycalmdown commented Jun 2, 2015

+1

@hustKiwi
Copy link

@hustKiwi hustKiwi commented Jun 3, 2015

+1

@jonjaques
Copy link

@jonjaques jonjaques commented Jun 12, 2015

+1, would you accept a PR for this?

@iansinnott
Copy link

@iansinnott iansinnott commented Aug 1, 2015

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);
};
@refack
Copy link
Collaborator

@refack refack commented Aug 15, 2015

Hello all,
For now we have .end()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.