Skip to content
Snippets Groups Projects
Commit 86e3f7d2 authored by Jono Wenger's avatar Jono Wenger
Browse files

Fix error checking in indexedDb

parent ce9b0758
No related branches found
No related tags found
1 merge request!60Revert "Fail a test to be sure it works"
...@@ -429,6 +429,9 @@ func (w *wasmModel) receiveHelper(newMessage *Message, isUpdate bool) (uint64, ...@@ -429,6 +429,9 @@ func (w *wasmModel) receiveHelper(newMessage *Message, isUpdate bool) (uint64,
return 0, errors.Errorf("Upserting Message failed: %+v", err) return 0, errors.Errorf("Upserting Message failed: %+v", err)
} }
res, err := addReq.Result() res, err := addReq.Result()
if err != nil {
return 0, errors.Errorf("Getting result from request failed: %+v", err)
}
// NOTE: Sometimes the insert fails to return an error but hits a duplicate // NOTE: Sometimes the insert fails to return an error but hits a duplicate
// insert, so this fallthrough returns the UUID entry in that case. // insert, so this fallthrough returns the UUID entry in that case.
......
...@@ -109,9 +109,6 @@ func newWASMModel(databaseName string, encryption cryptoChannel.Cipher, ...@@ -109,9 +109,6 @@ func newWASMModel(databaseName string, encryption cryptoChannel.Cipher,
} }
// Attempt to ensure the database has been properly initialized // Attempt to ensure the database has been properly initialized
if err != nil {
return nil, err
}
openRequest, err = idb.Global().Open(ctx, databaseName, currentVersion, openRequest, err = idb.Global().Open(ctx, databaseName, currentVersion,
func(db *idb.Database, oldVersion, newVersion uint) error { func(db *idb.Database, oldVersion, newVersion uint) error {
return nil return nil
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment