Skip to content
Snippets Groups Projects
Commit 227e29b7 authored by Richard T. Carback III's avatar Richard T. Carback III
Browse files

Merge branch 'release' of git.xx.network:elixxir/xxdk-wasm into release

parents 5278e070 a07932ee
No related branches found
No related tags found
1 merge request!67fix for latest client release
......@@ -419,8 +419,7 @@ func (w *wasmModel) receiveHelper(
result, err := impl.Put(w.db, messageStoreName, messageObj)
// FIXME: The following is almost certainly causing a bug
// where all of our upsert operations are failing.
if err != nil && !strings.Contains(err.Error(),
"at least one key does not satisfy the uniqueness requirements") {
if err != nil && !strings.Contains(err.Error(), impl.ErrUniqueConstraint) {
// Only return non-unique constraint errors so that the case
// below this one can be hit and handle duplicate entries properly.
return 0, errors.Errorf("Unable to put Message: %+v", err)
......
......@@ -290,8 +290,7 @@ func (w *wasmModel) receiveHelper(
result, err := impl.Put(w.db, messageStoreName, messageObj)
// FIXME: The following is almost certainly causing a bug
// where all of our upsert operations are failing.
if err != nil && !strings.Contains(err.Error(),
"at least one key does not satisfy the uniqueness requirements") {
if err != nil && !strings.Contains(err.Error(), impl.ErrUniqueConstraint) {
// Only return non-unique constraint errors so that the case
// below this one can be hit and handle duplicate entries properly.
return 0, errors.Errorf("Unable to put Message: %+v", err)
......
......@@ -30,6 +30,9 @@ const (
// ErrDoesNotExist is an error string for got undefined on Get operations.
ErrDoesNotExist = "result is undefined"
// ErrUniqueConstraint is an error string for failed uniqueness inserts.
ErrUniqueConstraint = "at least one key does not satisfy the uniqueness requirements"
)
// NewContext builds a context for indexedDb operations.
......
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