pouchdb-community / pouchdb-all-dbs

allDbs() plugin for PouchDB
Apache License 2.0
29 stars 18 forks source link

Undefined exception if constructor fails #1

Open nolanlawson opened 10 years ago

nolanlawson commented 10 years ago

RiakDOWN was seeing a pouch is not defined here: https://github.com/nolanlawson/pouchdb-all-dbs/blob/master/index.js#L81. It crashed the entire pouchdb-server. That's bad; we should just recover and do something if the constructor fails.

gustavohenke commented 9 years ago

I'm using Cloudant, and they block _all_dbs for unauthenticated users. So, this plugin causes the same error for me, but on line 119.