catch in a try loop to fix daleharvey/pouchdb#1272