-
-
Notifications
You must be signed in to change notification settings - Fork 652
Closed
Labels
Description
Describe the bug
If the indexeddb throws an exception, normally the store would have degraded on a MemoryStore.
This does not longer work, because of the switch to the async-notation. The exceptions do not get caught and the degration will not be started.
To Reproduce
Steps to reproduce the behavior:
- Client startup with custom indexeddb in store
import db from './customindexeddb';
let opts = {
store: new matrixcs.IndexedDBStore(
indexeddb: db,
dbName: 'matrix-store',
),
baseUrl: "https://matrix.org",
};
var client = matrixcs.createClient(opts);
client.store.startup();- customindexeddb is programmed to throw on reading from object stores
- MatrixClient crashes, but does not degrade to MemoryStore
Expected behavior
An error is thrown in the console, indexeddb will not be used anymore, and the backend store falls back to the MemoryStore.