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

forgetting a trailing slash for cloudant dbUrl crashes with hard to decipher error #542

Open
dominicbarnes opened this issue Dec 4, 2017 · 2 comments

Comments

@dominicbarnes
Copy link

Currently, if you use a Cloudant backend along with a dbUrl config that is missing a / at the end, you'll end up with an error like this:

Error: getaddrinfo ENOTFOUND c38aeb6d-2e18-40ca-b7e9-404da06abd39-bluemix.cloudant.comhoodie-config c38aeb6d-2e18-40ca-b7e9-404da06abd39-bluemix.cloudant.comhoodie-config:443

The fix is ensuring the URL has a / appended, and this appears to be caused by this "hack". In my case, it ended up making the db hostname <account>.cloudant.comhack, which triggers the above DNS lookup error.

Possible solutions here include:

  • detect a URL without a trailing / and throw an error
  • handle more gracefully by appending / when missing
@gr2m
Copy link
Member

gr2m commented Dec 9, 2017

can you share your exact setup, leaving out the password of course? I was not able to reproduce the problem with @hoodie/server myself

@gr2m
Copy link
Member

gr2m commented Dec 9, 2017

oh could it be we run into pouchdb/pouchdb#5814 (comment)? PouchDB is a great project to contribute to as well, happy to help out if you get stuck

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

No branches or pull requests

2 participants