Hi, I need help detecting invalid IndexedDB and maybe using another adapter. Cannot figure out how to
catch InvalidStateError from idb in Firefox incognito mode.
// I am trying to open PouchDB normally, but this fails in Firefox Incognito mode
var db = new PouchDB('test');
// InvalidStateError
// I see the idb error callback being called if the open request fails
exports.idbError = function (callback) {
return function (event) {
var message = (event.target && event.target.error &&
event.target.error.name) || event.target;
callback(errors.error(errors.IDB_ERROR, message, event.type));
};
};
// I want to catch this error and maybe switch to using memory provider, but do not see
// a way to attach error handler to the PouchDB function