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

Propagate the original connection error, including reason and stack. #90

Merged
merged 1 commit into from
Dec 10, 2013
Merged

Propagate the original connection error, including reason and stack. #90

merged 1 commit into from
Dec 10, 2013

Conversation

mk-pmb
Copy link
Contributor

@mk-pmb mk-pmb commented Dec 9, 2013

because knowing why a connection failed, helps fixing it.

@gabrielstuff
Copy link

This is perfect ! It just helped me out with a strugling configuration error. Thanks @mk-pmb
Basically it just show where the error comes from. So instead of getting :

Error connecting to database:

with no more information, you get a nice :

Error connecting to database: failed to connect to [foobar:27017]

With the reason and the url of the db.

kcbanner added a commit that referenced this pull request Dec 10, 2013
propagate the original connection error, including reason and stack.
@kcbanner kcbanner merged commit 8e0c6a2 into jdesboeufs:master Dec 10, 2013
@kcbanner
Copy link
Collaborator

Thanks!

@mk-pmb mk-pmb changed the title propagate the original connection error, including reason and stack. Propagate the original connection error, including reason and stack. Aug 10, 2022
@mk-pmb
Copy link
Contributor Author

mk-pmb commented Aug 10, 2022

To make it more future-proof, someone should update the instanceof to instead use my package is-error.

Edit: Nah, actually we should upgrade this to use verror. It's made with the express purpose of forwarding an error with an added explanation.

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

Successfully merging this pull request may close these issues.

3 participants